Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-20 Thread Christoph Hellwig
On Fri, Jul 20, 2007 at 01:27:26PM +1000, Rusty Russell wrote: > On Thu, 2007-07-19 at 19:27 +0200, Christoph Hellwig wrote: > > The version that just got into mainline still has the __put_task_struct > > export despite not needing it anymore. Care to fix this up? > > No, it got patched in then

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-20 Thread Christoph Hellwig
On Fri, Jul 20, 2007 at 01:27:26PM +1000, Rusty Russell wrote: On Thu, 2007-07-19 at 19:27 +0200, Christoph Hellwig wrote: The version that just got into mainline still has the __put_task_struct export despite not needing it anymore. Care to fix this up? No, it got patched in then

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-19 Thread Rusty Russell
On Thu, 2007-07-19 at 19:27 +0200, Christoph Hellwig wrote: > The version that just got into mainline still has the __put_task_struct > export despite not needing it anymore. Care to fix this up? No, it got patched in then immediately patched out again. Andrew mis-mixed my patches, but there

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-19 Thread Christoph Hellwig
On Thu, Jul 12, 2007 at 02:52:23PM +1000, Rusty Russell wrote: > This is solely for the wakeup: you don't wake an mm 8) > > The mm reference is held as well under the big lguest_mutex (mm gets > destroyed before files get closed, so we definitely do need to hold a > reference). > > I just

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-19 Thread Christoph Hellwig
On Thu, Jul 12, 2007 at 02:52:23PM +1000, Rusty Russell wrote: This is solely for the wakeup: you don't wake an mm 8) The mm reference is held as well under the big lguest_mutex (mm gets destroyed before files get closed, so we definitely do need to hold a reference). I just completed

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-19 Thread Rusty Russell
On Thu, 2007-07-19 at 19:27 +0200, Christoph Hellwig wrote: The version that just got into mainline still has the __put_task_struct export despite not needing it anymore. Care to fix this up? No, it got patched in then immediately patched out again. Andrew mis-mixed my patches, but there have

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-12 Thread Rusty Russell
On Thu, 2007-07-12 at 14:10 +0300, Avi Kivity wrote: > Rusty Russell wrote: > > Remove export of __put_task_struct, and usage in lguest > > > > lguest takes a reference count of tasks for two reasons. The first is > > bogus: the /dev/lguest close callback will be called before the task > > is

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-12 Thread Avi Kivity
Rusty Russell wrote: Remove export of __put_task_struct, and usage in lguest lguest takes a reference count of tasks for two reasons. The first is bogus: the /dev/lguest close callback will be called before the task is destroyed anyway, so no need to take a reference on open. What about

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-12 Thread Avi Kivity
Rusty Russell wrote: Remove export of __put_task_struct, and usage in lguest lguest takes a reference count of tasks for two reasons. The first is bogus: the /dev/lguest close callback will be called before the task is destroyed anyway, so no need to take a reference on open. What about

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-12 Thread Rusty Russell
On Thu, 2007-07-12 at 14:10 +0300, Avi Kivity wrote: Rusty Russell wrote: Remove export of __put_task_struct, and usage in lguest lguest takes a reference count of tasks for two reasons. The first is bogus: the /dev/lguest close callback will be called before the task is destroyed

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 21:24 -0700, Andrew Morton wrote: > We seem to be taking the reference against the wrong thing here. It should > be against the mm, not against a task_struct? This is solely for the wakeup: you don't wake an mm 8) The mm reference is held as well under the big lguest_mutex

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Andrew Morton
On Thu, 12 Jul 2007 12:48:41 +1000 Rusty Russell <[EMAIL PROTECTED]> wrote: > On Wed, 2007-07-11 at 19:28 -0700, David Miller wrote: > > From: Rusty Russell <[EMAIL PROTECTED]> > > Date: Thu, 12 Jul 2007 11:21:51 +1000 > > > > > To do inter-guest (ie. inter-process) I/O you really have to make

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Thu, 12 Jul 2007 13:15:18 +1000 > Sure, the process has /dev/lguest open, so I can do something in the > close routine. Instead of keeping a reference to the tsk, I can keep a > reference to the struct lguest (currently it doesn't have or need a >

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 19:51 -0700, David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Thu, 12 Jul 2007 12:48:41 +1000 > > > We drop the lock after I/O, and then do this wakeup. Meanwhile the > > other task might have exited. > > I already understand what you're doing. > > Is

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Thu, 12 Jul 2007 12:48:41 +1000 > We drop the lock after I/O, and then do this wakeup. Meanwhile the > other task might have exited. I already understand what you're doing. Is it possible to use exit notifiers to handle this case? That's what I'm

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 19:28 -0700, David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Thu, 12 Jul 2007 11:21:51 +1000 > > > To do inter-guest (ie. inter-process) I/O you really have to make sure > > the other side doesn't go away. > > You should just let it exit and when it

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Thu, 12 Jul 2007 11:21:51 +1000 > To do inter-guest (ie. inter-process) I/O you really have to make sure > the other side doesn't go away. You should just let it exit and when it does you receive some kind of exit notification that resets your

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 14:23 +0200, Christoph Hellwig wrote: > > lguest-export-symbols-for-lguest-as-a-module.patch > > __put_task_struct is one of those no way in hell should this be exported > things because we don't want modules messing with task lifetimes. > > Fortunately I can't find

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Andrew Morton
On Wed, 11 Jul 2007 14:23:24 +0200 Christoph Hellwig <[EMAIL PROTECTED]> wrote: > > lguest-export-symbols-for-lguest-as-a-module.patch > > __put_task_struct is one of those no way in hell should this be exported > things because we don't want modules messing with task lifetimes. > > Fortunately

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Randy Dunlap
On Wed, 11 Jul 2007 14:23:24 +0200 Christoph Hellwig wrote: ... > > lguest-the-guest-code.patch > > lguest-the-host-code.patch > > lguest-the-host-code-lguest-vs-clockevents-fix-resume-logic.patch > > lguest-the-asm-offsets.patch > > lguest-the-makefile-and-kconfig.patch > >

lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Christoph Hellwig
> lguest-export-symbols-for-lguest-as-a-module.patch __put_task_struct is one of those no way in hell should this be exported things because we don't want modules messing with task lifetimes. Fortunately I can't find anything actually using this in lguest, so it looks the issue has been solved

lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Christoph Hellwig
lguest-export-symbols-for-lguest-as-a-module.patch __put_task_struct is one of those no way in hell should this be exported things because we don't want modules messing with task lifetimes. Fortunately I can't find anything actually using this in lguest, so it looks the issue has been solved in

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Randy Dunlap
On Wed, 11 Jul 2007 14:23:24 +0200 Christoph Hellwig wrote: ... lguest-the-guest-code.patch lguest-the-host-code.patch lguest-the-host-code-lguest-vs-clockevents-fix-resume-logic.patch lguest-the-asm-offsets.patch lguest-the-makefile-and-kconfig.patch lguest-the-console-driver.patch

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Andrew Morton
On Wed, 11 Jul 2007 14:23:24 +0200 Christoph Hellwig [EMAIL PROTECTED] wrote: lguest-export-symbols-for-lguest-as-a-module.patch __put_task_struct is one of those no way in hell should this be exported things because we don't want modules messing with task lifetimes. Fortunately I can't

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 14:23 +0200, Christoph Hellwig wrote: lguest-export-symbols-for-lguest-as-a-module.patch __put_task_struct is one of those no way in hell should this be exported things because we don't want modules messing with task lifetimes. Fortunately I can't find anything

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Miller
From: Rusty Russell [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 11:21:51 +1000 To do inter-guest (ie. inter-process) I/O you really have to make sure the other side doesn't go away. You should just let it exit and when it does you receive some kind of exit notification that resets your virtual

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 19:28 -0700, David Miller wrote: From: Rusty Russell [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 11:21:51 +1000 To do inter-guest (ie. inter-process) I/O you really have to make sure the other side doesn't go away. You should just let it exit and when it does you

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Miller
From: Rusty Russell [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 12:48:41 +1000 We drop the lock after I/O, and then do this wakeup. Meanwhile the other task might have exited. I already understand what you're doing. Is it possible to use exit notifiers to handle this case? That's what I'm

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 19:51 -0700, David Miller wrote: From: Rusty Russell [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 12:48:41 +1000 We drop the lock after I/O, and then do this wakeup. Meanwhile the other task might have exited. I already understand what you're doing. Is it possible

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread David Miller
From: Rusty Russell [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 13:15:18 +1000 Sure, the process has /dev/lguest open, so I can do something in the close routine. Instead of keeping a reference to the tsk, I can keep a reference to the struct lguest (currently it doesn't have or need a refcnt).

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Andrew Morton
On Thu, 12 Jul 2007 12:48:41 +1000 Rusty Russell [EMAIL PROTECTED] wrote: On Wed, 2007-07-11 at 19:28 -0700, David Miller wrote: From: Rusty Russell [EMAIL PROTECTED] Date: Thu, 12 Jul 2007 11:21:51 +1000 To do inter-guest (ie. inter-process) I/O you really have to make sure the

Re: lguest, Re: -mm merge plans for 2.6.23

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 21:24 -0700, Andrew Morton wrote: We seem to be taking the reference against the wrong thing here. It should be against the mm, not against a task_struct? This is solely for the wakeup: you don't wake an mm 8) The mm reference is held as well under the big lguest_mutex