From owner-freebsd-current Sun Dec 29 15:44:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 288BA37B401 for ; Sun, 29 Dec 2002 15:44:16 -0800 (PST) Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80EC343ED4 for ; Sun, 29 Dec 2002 15:44:15 -0800 (PST) (envelope-from bmilekic@unixdaemons.com) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id gBTNlZA16975; Sun, 29 Dec 2002 18:47:35 -0500 (EST) (envelope-from bmilekic@unixdaemons.com) Date: Sun, 29 Dec 2002 18:47:35 -0500 From: Bosko Milekic To: Kyunghwan Kim Cc: current@freebsd.org Subject: Re: mballoc kernel thread Message-ID: <20021229184735.A16925@unixdaemons.com> References: <20021229173549.GA89604@ada.snu.ac.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021229173549.GA89604@ada.snu.ac.kr>; from redjade@ada.snu.ac.kr on Mon, Dec 30, 2002 at 02:35:49AM +0900 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Dec 30, 2002 at 02:35:49AM +0900, Kyunghwan Kim wrote: > I made a mballoc kernel thread that fills up mbufs and mbuf clusters > when number of mbufs/clusters of its general list is under low watermark > along with suggestions that Mr. Milekic has made around late November. > > http://redjade.org/doc/patches/mballoc_kproc.diff > > It seems useful until and even after kmem_malloc() is out from under Giant. > Would someone please comment upon the diff and questions below? > > - Appropriate watermark check rate > - How to use mballoc [via wakeup] in mb_alloc() efficiently when it needs > to allocate a new page > [Hardest for me to decide because of lack of experience...] > - M_WAIT or M_NOWAIT in memory allocation of mballoc kproc > - Strategy for high watermark wash out > > Thanks. > -- > Kyunghwan Kim > redjade@ada.snu.ac.kr First of all, thanks for taking the incentive to work on FreeBSD code. With that said, I wish you had contacted me before the code-writing began because I'm currently working on a version myself. From a quick glance, your code is OK but the kproc needs to do more than just replenish the caches. It needs to be able to flush out the caches back to VM when necessary, at least, and should be able to perform some sort of basic auto-tuning on the watermarks. Yes, I do see that you have all of this in a "TODO" comment. I don't really know what to tell you because I'm working on the exact same thing (and I mentionned in the Emails you brought up that I would be) except just keep your code and go ahead and finish what you had intended but I doubt that I'll be looking at integrating it before I finish my version. Maybe then we could merge the two, or something. Heck, I don't know. It's not really like doing this is difficult so I don't know how we would resolve the conflict. -- Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message