Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-18 Thread Eric Dumazet
Coywolf Qi Hunt a écrit : On 8/18/05, Eric Dumazet [EMAIL PROTECTED] wrote: Andi Kleen a écrit : (because of the insane struct file_ra_state f_ra. I wish this structure were dynamically allocated only for files that really use it) How about you submit a patch for that instead? -Andi

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-18 Thread Eric Dumazet
David S. Miller a écrit : From: Andi Kleen [EMAIL PROTECTED] Date: Thu, 18 Aug 2005 03:05:25 +0200 I would just set the ra pointer to a single global structure if the allocation fails. Then you can avoid all the other checks. It will slow down things and trash some state, but not fail and

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-18 Thread David S. Miller
From: Eric Dumazet [EMAIL PROTECTED] Date: Thu, 18 Aug 2005 09:14:47 +0200 After reading your suggestions, I understand we still need two slabs. One (filp_cachep) without the readahead data, the other one (filp_ra_cachep) with it. Correct. static inline struct file_ra_state

[PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread Eric Dumazet
Andi Kleen a écrit : (because of the insane struct file_ra_state f_ra. I wish this structure were dynamically allocated only for files that really use it) How about you submit a patch for that instead? -Andi OK, could you please comment this patch ? The problem of dynamically

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread Andi Kleen
On Thu, Aug 18, 2005 at 02:40:46AM +0200, Eric Dumazet wrote: Andi Kleen a ?crit : (because of the insane struct file_ra_state f_ra. I wish this structure were dynamically allocated only for files that really use it) How about you submit a patch for that instead? -Andi OK,

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread Coywolf Qi Hunt
On 8/18/05, Eric Dumazet [EMAIL PROTECTED] wrote: Andi Kleen a écrit : (because of the insane struct file_ra_state f_ra. I wish this structure were dynamically allocated only for files that really use it) How about you submit a patch for that instead? -Andi OK, could you please

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread David S. Miller
From: Andi Kleen [EMAIL PROTECTED] Date: Thu, 18 Aug 2005 03:05:25 +0200 I would just set the ra pointer to a single global structure if the allocation fails. Then you can avoid all the other checks. It will slow down things and trash some state, but not fail and nobody should expect good

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread Nick Piggin
Andi Kleen wrote: I would just set the ra pointer to a single global structure if the allocation fails. Then you can avoid all the other checks. It will slow down things and trash some state, but not fail and nobody should expect good performance after out of memory anyways. The only check

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread Andi Kleen
You don't want to always have bad performance though, so you could attempt to allocate if either the pointer is null _or_ it points to the global structure? Remember it's after a GFP_KERNEL OOM. If that fails most likely you have deadlocked somewhere else already because Linux's handling of

Re: [PATCH] struct file cleanup : the very large file_ra_state is now allocated only on demand.

2005-08-17 Thread Nick Piggin
Andi Kleen wrote: You don't want to always have bad performance though, so you could attempt to allocate if either the pointer is null _or_ it points to the global structure? Remember it's after a GFP_KERNEL OOM. If that fails most likely you have deadlocked somewhere else already because