From owner-freebsd-arch@freebsd.org Sat Apr 29 23:43:36 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08664D55914 for ; Sat, 29 Apr 2017 23:43:36 +0000 (UTC) (envelope-from axylos@doge.city) Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mail.perfora.net", Issuer "thawte SSL CA - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B72E81F13 for ; Sat, 29 Apr 2017 23:43:35 +0000 (UTC) (envelope-from axylos@doge.city) Received: from kunai.nyc.rr.com ([24.193.46.243]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MA6db-1dFJG50dR3-00BOK3 for ; Sun, 30 Apr 2017 01:43:28 +0200 Date: Sat, 29 Apr 2017 11:40:18 -0400 From: Drake Talley To: freebsd-arch@freebsd.org Subject: sysctl for named posix semaphores Message-ID: <20170429154018.GA3703@kunai.nyc.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) X-Provags-ID: V03:K0:p+nkLbzuLE6vvcsIe2pHwQ+upvE/ZkKMQ+vcbsIlP/TOhDJZZQ6 nayy0eZbM3e0hx1nuC5MzNRkIBqGnNI5lTvyQo+zlC1nTnctyVArCPgAbeT2s/MnWu9MK8g +1j+NV3/NKhQHSD6Cf5FRfIIndd6XG2X0SkXDADuWjVbKtt7NQ+PoXpjGTMoEJ6ieyivfVi k1W6R7PA8JPktRzTl3Hog== X-UI-Out-Filterresults: notjunk:1;V01:K0:0ODvTgWKkj0=:+sBd+AuXlri0B9UVRDPS5O fjarkMjlyiulPwABGnokpLhNlie2VlXk3X62ZYjy0Tgp60ZlCYvUwurGkgSva8bOar9WYIlfq F5ASPf1mEJQQ0jlZk9nHv4zC3vLsTBgqVbPUE45Zuwjr21UYtnYYewrM0qimsRCMXBIgLrzYV qdIxam5VzwQu8K39CPg7saH/QRQdLHhwo/aQJ4PfgkTtE3xtg52BBbVQ3YJSOxJH5GhemE0ZE /zoohDYbFCnyvxUqSB4a0PP7VwlJsVorHRVY67DC3Qkk4h9xtapbH+Faix0n/kXaLTp1YGm96 MDubc+odqfoDOKj/tsMVq5wJqMCqs4BvCmiERTKRSHA+6GBXHw99BJ5B8zAPb5ylSuFMLp4fM NF/h+2OdZBEDN0EtxGNRP+bCMYmrprWCCdRI7CtPoI5gL7dv1edydwV6k/Zwiq8ppkUIyxItl y9L3c97BoauhrBg0gQ3HCGXlL3s/l41oXUI/jYyNNhZ8hrmxiHqaRauOL9mFrnSL9WP9cJ8ZJ zR1ABJue835HYsDGivwf8cuYj/nxhP8utvqqQo0Rogs6zAJeUR5G3ZznvX8jihrEgBYVEiIgt KabGSThfjKcaBnOZnne3ZHbfUXhuJ8rC4TN0OkjZtmQkHWYjmfFSqCDhNeVVZAlrnPcd0BmV4 yv8d1knaVZIp2BMQKWl+bWcU8+Ez1wHIxMPOTFOTCfktoZSq5QMXPGgH4XYnrqWsDGoM= X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2017 23:43:36 -0000 I'm interested in being able to display information about all active named POSIX semaphores. I have not been able to find a sane way to do this, and unless there's something obvious I've missed, it may be worth considering building a sysctl or some other interface for accessing this information. A while back in the mailing list there seems to have been some discussion about building out a "semfs" or some other file system interface akin to /dev/shm in Linux, but there were concerns about the POSIX compatibility of that approach. On a related note in /src/sys/kern/uipc_shm.c there is the following TODO: * (1) Need to export data to a userland tool via a sysctl. Should ipcs(1) * and ipcrm(1) be expanded or should new tools to manage both POSIX * kernel semaphores and POSIX shared memory be written? So, it's been acknowledged that a sysctl or some new utility is on the table, and exporting this data to userland isn't blasphemous, although perhaps not the most pressing need at the moment. Setting Sys V IPC on the side, has there been discussion or consideration of similar tools for POSIX semaphores? Whether or not it's deemed worth doing, I'd appreciate any info or references to discussions about this topic since I'm like to tinker with it on my own if nothing else. Drake