[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libhurd-cap-server/class-alloc.c

From: Marcus Brinkmann
Subject: Re: libhurd-cap-server/class-alloc.c
Date: Mon, 17 Jan 2005 13:05:38 +0100
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Mon, 17 Jan 2005 11:01:53 +0000,
Neal H. Walfield wrote:
>  - only reap on a per-slab basis shifting the burden to the pager

How will the pager do the locking/reaping?  If we don't have an
internal lock, it needs to use some hook provided by the user.  And
how will the pager learn about the slab?

Or are you saying that slabs are not automatically reaped anymore,
shifting the responsibility to not only pager, but to the user of the

> Finally, it is worth adding that caching buffers for non-wired spaces
> may negatively impact performance: if the buffer is paged out and
> eventually reused, the page-in operation may be more expensive than
> just initializing some fresh memory.

Good point.

I think we need a way to prevent dropping buffers, though (essentially
your wired option, I guess, although it doesn't specifically require
that).  The specific application I am thinking about is task, and that
is always wired, so it is a simple case really.  The reason is that I
wanted to allocate thread numbers when creating the slab cache object,
and then use the slab cache also as a way to find free thread numbers
at thread allocation.  Thinking about it, this may not be the best
thing to do, so maybe I should just drop that and manage thread
numbers differently.

>  - have callers invoke the reap function on specific slabs
>  - require callers to serialize access to slabs
>  - modify hurd_slab create to take an additional attribute which
>    indicates whether unused buffers should be cached or just
>    immediately deallocated

Sounds good to me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]