[Top][All Lists]

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

Re: Thread model (was: Ext2 superblock fault)

From: Samuel Thibault
Subject: Re: Thread model (was: Ext2 superblock fault)
Date: Wed, 19 Mar 2008 16:05:31 +0000
User-agent: Mutt/1.5.12-2006-07-14

Michal Suchanek, le Wed 19 Mar 2008 16:55:48 +0100, a écrit :
> On 19/03/2008, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> > Yes, that's what I meant actually: the diskfs_sync_everything() function
> >  is able to trigger a lot of thread creations.
> >
> >  A way to have things work correctly would be by marking threads with a
> >  "level", i.e. diskfs_sync_everything runs at level 0, threads that it
> >  generates run at level 1, and threads that process their page faults run
> >  at level 2, etc.  Then we just need to limit the number of threads for a
> >  given level.  That should always permit termination of requests, while
> >  still limiting the number of thread to a constant times the maximum
> >  nesting of page faults.
> How would you increase the level?

The kernel would have to transmit it from the page fault to the memory
object request.

> Would that mean that some initial process is level 1, login level 2, a
> user process started from top level shell level 3, from window manager
> level n >> 3?

No, it's not related to processes, but to threads servicing memory
object requests.

> Or does the level increase only when the thread goes through some page
> fault port?

The level doesn't really increase, it's just that the thread servicing a
page fault inherits the original thread's level plus one.

> How many levels can result from this?

The maximum nesting of page faults.


reply via email to

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