From owner-cvs-all Sun Oct 10 10: 8: 5 1999 Delivered-To: cvs-all@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id D447E14CBF; Sun, 10 Oct 1999 10:07:54 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 6C1731CC6; Mon, 11 Oct 1999 01:07:51 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Matthew Dillon Cc: Poul-Henning Kamp , "Daniel C. Sobral" , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/vm vm_swap.c In-reply-to: Your message of "Sun, 10 Oct 1999 09:45:12 MST." <199910101645.JAA16830@apollo.backplane.com> Date: Mon, 11 Oct 1999 01:07:51 +0800 From: Peter Wemm Message-Id: <19991010170751.6C1731CC6@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Matthew Dillon wrote: > :> It's similar, but neither ccd nor vinum can guarentee non-blocking > :> operation in low-memory situations. And, anyhow, the swapper is my > :> baby. We can probably remove the external user accessible /dev/drum > :> but we aren't going to be messing with it any more then that. > : > :Cool, so you will kill /dev/drum then ? > : > :-- > :Poul-Henning Kamp FreeBSD coreteam member > :phk@FreeBSD.ORG "Real hackers run -current on their laptop." > > If you implement a means to create unassociated (i.e. no major/minor > number at all) devices, the swap device can be converted to one > internally. We aren't going to get rid of the cdevsw structure, though. > Creating totally custom I/O interfaces is never a good idea. But.. but.. the swap *device* isn't used.. All swstrategy() does is take the current bp, pick one of the actual swap devices dev_t's and reassigns and initates it via VOP_STRATEGY on the real vp. The cdevsw interface for /dev/drum could go away too and instead of swap_pager.c calling VOP_STRATEGY(bp->b_vp, bp), it'd call swstrategy(bp) and let swstrategy() enqueue it directly with VOP_STRATEGY(). THat saves one needless indirection through the VOP_* tables to a fictitios device that has no device properties at all. ie, swap_pager.c's change is from: BUF_KERNPROC(bp); VOP_STRATEGY(bp->b_vp, bp); to: BUF_KERNPROC(bp); swstrategy(bp); (swstrategy probably isn't the ideal name but it'll do for the illustration) The vp for the 'swap device' isn't used either. bp->v_bp is wasted cpu in this case. Minor/major numbers aren't needed or used. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message