From owner-freebsd-current@freebsd.org Tue May 14 22:38:56 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12FD0159A9FA for ; Tue, 14 May 2019 22:38:56 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 653288794B; Tue, 14 May 2019 22:38:55 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x4EMclt9014981 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 15 May 2019 01:38:50 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x4EMclt9014981 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x4EMclH7014980; Wed, 15 May 2019 01:38:47 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Wed, 15 May 2019 01:38:47 +0300 From: Konstantin Belousov To: Thomas Munro Cc: Bob Bishop , Andriy Gapon , FreeBSD Current , Alan Somers Subject: Re: leaked swap? Message-ID: <20190514223847.GK2748@kib.kiev.ua> References: <9c5eaa94-f55b-464a-ab0f-267e7fce4bd0@FreeBSD.org> <20190318153230.GS96870@kib.kiev.ua> <782c2d4b-6920-085b-5489-65fae462a194@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 May 2019 22:38:56 -0000 On Wed, May 15, 2019 at 10:02:51AM +1200, Thomas Munro wrote: > 1. As mentioned, you can't list 'em (unlike Linux, where you can just > ls /dev/shm). There's a TODO note, but it's not clear whether it's > best to extend ipcs or create a new userspace tool, and it wasn't > immediately clear to me how to feed the arbitrary sized results back > to userspace. I had a scheme worked out where you'd keep calling a > sysctl repeatedly to collect the data until it was done, and it'd > sometimes tell you you need a bigger buffer (because you probably have > to drain at least a whole hash table bucket at a time), but an > experienced FreeBSD hacker told me that was BS, and maybe what's > needed is a device you read. As well as the list-all-the-segments > tool, you'd also want to be able to unlink to tidy up. https://reviews.freebsd.org/D20258