Re: Weightless process class

2000-10-05 Thread Pavel Machek
Hi! > A process can't grab a kernel lock and then switch > back to user mode, can it?(if it could, I can > imagine some nasty DoS attacks...) > > Problem is, when we decide to schedule in a process > or not, we know the process was last stuck in > schedule() ... in kernel mode ;( > > I'd lo

Re: Weightless process class

2000-10-04 Thread David Feuer
It dost seem to me that even when the process is not in the kernel, it could hold other sorts of fs locks. Also, what if the process is caught in a signal handler? Couldn't you end up being unable to kill the thing in an overactive system? -- This message has been brought to you by the letter

Re: Weightless process class

2000-10-04 Thread Rik van Riel
On Thu, 5 Oct 2000, Matti Aarnio wrote: > On Wed, Oct 04, 2000 at 06:16:57PM -0300, Rik van Riel wrote: [priority inversion] > > We don't need that. > > > > We just need one boolean per thread ... is it holding a kernel > > lock or not? > > The BKL or *any* (kernel) lock ? > >

Re: Weightless process class

2000-10-04 Thread Nigel Gamble
On Wed, 4 Oct 2000, Rik van Riel wrote: > On Wed, 4 Oct 2000, LA Walsh wrote: > > > I had another thought regarding resource scheduling -- has the > > idea of a "weightless" process been brought up? > > Yes, look for "idle priority", etc.. > It also turned out to have some problems ... > > > W

Re: Weightless process class

2000-10-04 Thread Matti Aarnio
On Wed, Oct 04, 2000 at 06:16:57PM -0300, Rik van Riel wrote: > > > --- > > > One way would be to set a flag "I'm holding a lock" and when > > > it releases the lock(s), deschedule it? > > > > There is a well-known name for this -- priority inversion. > > > > Implement the whole sheban

Re: Weightless process class

2000-10-04 Thread Rik van Riel
On Thu, 5 Oct 2000, Matti Aarnio wrote: > On Wed, Oct 04, 2000 at 12:49:43PM -0700, LA Walsh wrote: > > > One problem here is that you might end up with a weightless > > > process having grabbed a superblock lock, after which a > > > normal priority CPU hog kicks in and starves the weightless > >

Re: Weightless process class

2000-10-04 Thread Matti Aarnio
On Wed, Oct 04, 2000 at 12:49:43PM -0700, LA Walsh wrote: > > One problem here is that you might end up with a weightless > > process having grabbed a superblock lock, after which a > > normal priority CPU hog kicks in and starves the weightless > > process. > --- > One way would be to set a

Re: Weightless process class

2000-10-04 Thread Rik van Riel
On Wed, 4 Oct 2000, Nathan Paul Simons wrote: > On Wed, Oct 04, 2000 at 04:16:22PM -0300, Rik van Riel wrote: > > Do we have something like an in_kernel(proc) macro ??? > > "user_mode()" in include/asm/ptrace.h? But that only checks to > see if the regs struct you passed it are from a kernel thr

Re: Weightless process class

2000-10-04 Thread Nathan Paul Simons
On Wed, Oct 04, 2000 at 04:16:22PM -0300, Rik van Riel wrote: > Do we have something like an in_kernel(proc) macro ??? "user_mode()" in include/asm/ptrace.h? But that only checks to see if the regs struct you passed it are from a kernel thread or not. No checks to see if the process has any ke

RE: Weightless process class

2000-10-04 Thread LA Walsh
> One problem here is that you might end up with a weightless > process having grabbed a superblock lock, after which a > normal priority CPU hog kicks in and starves the weightless > process. --- One way would be to set a flag "I'm holding a lock" and when it releases the lock(s), desc

Re: Weightless process class

2000-10-04 Thread Rik van Riel
On Wed, 4 Oct 2000, LA Walsh wrote: > I had another thought regarding resource scheduling -- has the > idea of a "weightless" process been brought up? Yes, look for "idle priority", etc.. It also turned out to have some problems ... > Weightless means it doesn't count toward 'load' and the cla