bug-hurd
[Top][All Lists]
Advanced

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

Re: Mach's in-kernel scheduling


From: Thomas Bushnell, BSG
Subject: Re: Mach's in-kernel scheduling
Date: 20 Aug 2001 16:45:31 -0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Igor Khavkine <i_khavki@alcor.concordia.ca> writes:

> "Thomas Bushnell, BSG" wrote:
> > 
> > Igor Khavkine <i_khavki@alcor.concordia.ca> writes:
> > 
> > > It is my understanding that Mach supports "in-kernel" threads,
> > > i.e. threads that run concurrently in the kernel, not being visible
> > > in userspace.
> > >
> > > The first kernel thread, after it does all the initialization and starts
> > > userspace initialization, runs vm_pageout() to become the garbage
> > > collection daemon.
> > 
> > Please don't call this garbage collection, it isn't.
> 
> I was mostly looking at the zone allocation code, and there is a
> function that calls itself consider_zone_gc() which is supposed do
> what appears to be garbage collection. I traced it's invocation to
> the pageout-daemon, that's why I called that whole thread the
> garbage collection daemon. I guess that's only part of it.

Oh, it's not.  pageout is not garbage collection.  consider_zone_gc
does real GC, but pageout is really a different task.

> I see, that makes sense. I guess thread_block() is like a yield statement.

That's exactly what it is.

> My primary concern here is whether or not the pageout thread is called
> or not when there is a shortage or resources. For example I dont see
> any indication that the pageout thread is invoked when zalloc is unable
> to allocate any more memory for some zone, although it is possible
> that some kernel resources will be freed once the zone garbage collector
> has run. 
> Is there something I'm missing, or is there a valid reason
> for panicing when virtual memory is exhausted instead of trying to free
> up some which is unused?

The pageout demon doesn't really free up VM, it has the job of freeing
up physical memory.  It does get automatically tickled when free
physical memory runs low.

The pageout thread is given the task of calling consider_zone_gc,
which (in the case of pageable zones) might be an important way to
release virtual memory.  But the pageout thread only wakes up when
*physical* memory runs out.

It might be indeed that zone fillup should also trigger the pageout
thread.  This would be true if it were possible for zone fillup to
happen without any pageout ever being necessary.  I suppose that might
actually happen.  This suggests that something in zalloc.c should
wakeup vm_page_free_wanted.

Thomas






reply via email to

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