Date: Mon, 11 Oct 1999 01:07:51 +0800 From: Peter Wemm <peter@netplex.com.au> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, "Daniel C. Sobral" <dcs@newsguy.com>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/vm vm_swap.c Message-ID: <19991010170751.6C1731CC6@overcee.netplex.com.au> In-Reply-To: Your message of "Sun, 10 Oct 1999 09:45:12 MST." <199910101645.JAA16830@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991010170751.6C1731CC6>
