Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Eric Dumazet
On Friday 09 March 2007 17:11, Benjamin LaHaise wrote: > On Fri, Mar 09, 2007 at 12:13:35PM +0100, Eric Dumazet wrote: > > Then just drop the fget_light() 'optimisation' and always take a > > reference (atomic on f_count) regardless of single-thread or not. Instead > > of dirtying f_light, just do

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On Fri, Mar 09, 2007 at 12:13:35PM +0100, Eric Dumazet wrote: > Then just drop the fget_light() 'optimisation' and always take a reference > (atomic on f_count) regardless of single-thread or not. Instead of dirtying > f_light, just do the straightforward thing and be with it. > > (that is :

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Benjamin LaHaise
On Fri, Mar 09, 2007 at 12:13:35PM +0100, Eric Dumazet wrote: > Then just drop the fget_light() 'optimisation' and always take a reference > (atomic on f_count) regardless of single-thread or not. Instead of dirtying > f_light, just do the straightforward thing and be with it. > > (that is :

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka J Enberg
At some point in time, I wrote: > > Btw, what we can do is delay closing the actual revoked file until the > > task terminates. This has the unfortunate side-effect that a task has > > no way of freeing the resources now. But, I am beginning to think it's > > not a big problem because the inode

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Alan Cox
> Btw, what we can do is delay closing the actual revoked file until the > task terminates. This has the unfortunate side-effect that a task has > no way of freeing the resources now. But, I am beginning to think it's > not a big problem because the inode mapping will be zapped immediately > upon

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On 3/9/07, Eric Dumazet <[EMAIL PROTECTED]> wrote: > Then just drop the fget_light() 'optimisation' and always take a reference > (atomic on f_count) regardless of single-thread or not. Instead of dirtying > f_light, just do the straightforward thing and be with it. On 3/9/07, Pekka Enberg

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On 3/9/07, Eric Dumazet <[EMAIL PROTECTED]> wrote: Then just drop the fget_light() 'optimisation' and always take a reference (atomic on f_count) regardless of single-thread or not. Instead of dirtying f_light, just do the straightforward thing and be with it. That's what I did first but akpm

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Eric Dumazet
On Friday 09 March 2007 11:43, Pekka Enberg wrote: > On 3/9/07, Eric Dumazet <[EMAIL PROTECTED]> wrote: > > Cannot we use a flag in 'struct files_struct', set to one when the task > > is mono-thread (at task creation in fact), and set to 0 when it creates a > > new thread (or when someone

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On 3/9/07, Eric Dumazet <[EMAIL PROTECTED]> wrote: Cannot we use a flag in 'struct files_struct', set to one when the task is mono-thread (at task creation in fact), and set to 0 when it creates a new thread (or when someone remotely access to this "struct files_struct" in /proc/pid/fd/... )

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Eric Dumazet
On Friday 09 March 2007 09:14, Pekka J Enberg wrote: > From: Pekka Enberg <[EMAIL PROTECTED]> > > This adds a f_light flag to struct file to indicate that the file was > looked up with fget_light(). Needed by revoke to ensure we don't > close a file pointer while someone is using it without

[PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka J Enberg
From: Pekka Enberg <[EMAIL PROTECTED]> This adds a f_light flag to struct file to indicate that the file was looked up with fget_light(). Needed by revoke to ensure we don't close a file pointer while someone is using it without actually holding a reference. These bits were taken from the

[PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] This adds a f_light flag to struct file to indicate that the file was looked up with fget_light(). Needed by revoke to ensure we don't close a file pointer while someone is using it without actually holding a reference. These bits were taken from the forced

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Eric Dumazet
On Friday 09 March 2007 09:14, Pekka J Enberg wrote: From: Pekka Enberg [EMAIL PROTECTED] This adds a f_light flag to struct file to indicate that the file was looked up with fget_light(). Needed by revoke to ensure we don't close a file pointer while someone is using it without actually

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On 3/9/07, Eric Dumazet [EMAIL PROTECTED] wrote: Cannot we use a flag in 'struct files_struct', set to one when the task is mono-thread (at task creation in fact), and set to 0 when it creates a new thread (or when someone remotely access to this struct files_struct in /proc/pid/fd/... ) How

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Eric Dumazet
On Friday 09 March 2007 11:43, Pekka Enberg wrote: On 3/9/07, Eric Dumazet [EMAIL PROTECTED] wrote: Cannot we use a flag in 'struct files_struct', set to one when the task is mono-thread (at task creation in fact), and set to 0 when it creates a new thread (or when someone remotely access

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On 3/9/07, Eric Dumazet [EMAIL PROTECTED] wrote: Then just drop the fget_light() 'optimisation' and always take a reference (atomic on f_count) regardless of single-thread or not. Instead of dirtying f_light, just do the straightforward thing and be with it. That's what I did first but akpm

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On 3/9/07, Eric Dumazet [EMAIL PROTECTED] wrote: Then just drop the fget_light() 'optimisation' and always take a reference (atomic on f_count) regardless of single-thread or not. Instead of dirtying f_light, just do the straightforward thing and be with it. On 3/9/07, Pekka Enberg [EMAIL

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka J Enberg
At some point in time, I wrote: Btw, what we can do is delay closing the actual revoked file until the task terminates. This has the unfortunate side-effect that a task has no way of freeing the resources now. But, I am beginning to think it's not a big problem because the inode mapping

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Alan Cox
Btw, what we can do is delay closing the actual revoked file until the task terminates. This has the unfortunate side-effect that a task has no way of freeing the resources now. But, I am beginning to think it's not a big problem because the inode mapping will be zapped immediately upon

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Benjamin LaHaise
On Fri, Mar 09, 2007 at 12:13:35PM +0100, Eric Dumazet wrote: Then just drop the fget_light() 'optimisation' and always take a reference (atomic on f_count) regardless of single-thread or not. Instead of dirtying f_light, just do the straightforward thing and be with it. (that is :

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Pekka Enberg
On Fri, Mar 09, 2007 at 12:13:35PM +0100, Eric Dumazet wrote: Then just drop the fget_light() 'optimisation' and always take a reference (atomic on f_count) regardless of single-thread or not. Instead of dirtying f_light, just do the straightforward thing and be with it. (that is :

Re: [PATCH 2/7] revoke: add f_light flag for struct file

2007-03-09 Thread Eric Dumazet
On Friday 09 March 2007 17:11, Benjamin LaHaise wrote: On Fri, Mar 09, 2007 at 12:13:35PM +0100, Eric Dumazet wrote: Then just drop the fget_light() 'optimisation' and always take a reference (atomic on f_count) regardless of single-thread or not. Instead of dirtying f_light, just do the