Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-31 Thread Raghavendra K T
On 12/14/2013 06:09 AM, Linus Torvalds wrote: On Wed, Dec 11, 2013 at 3:05 PM, Andrew Morton wrote: But I'm really struggling to think up an implementation! The current code looks only at the caller's node and doesn't seem to make much sense. Should we look at all nodes? Hard to say

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-31 Thread Raghavendra K T
On 12/14/2013 06:09 AM, Linus Torvalds wrote: On Wed, Dec 11, 2013 at 3:05 PM, Andrew Morton a...@linux-foundation.org wrote: But I'm really struggling to think up an implementation! The current code looks only at the caller's node and doesn't seem to make much sense. Should we look at all

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-13 Thread Linus Torvalds
On Wed, Dec 11, 2013 at 3:05 PM, Andrew Morton wrote: > > But I'm really struggling to think up an implementation! The current > code looks only at the caller's node and doesn't seem to make much > sense. Should we look at all nodes? Hard to say without prior > knowledge of where those pages

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-13 Thread Linus Torvalds
On Wed, Dec 11, 2013 at 3:05 PM, Andrew Morton a...@linux-foundation.org wrote: But I'm really struggling to think up an implementation! The current code looks only at the caller's node and doesn't seem to make much sense. Should we look at all nodes? Hard to say without prior knowledge of

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-12 Thread Jan Kara
On Wed 11-12-13 15:05:22, Andrew Morton wrote: > On Wed, 11 Dec 2013 23:49:17 +0100 Jan Kara wrote: > > > > /* > > > - * Given a desired number of PAGE_CACHE_SIZE readahead pages, return a > > > - * sensible upper limit. > > > + * max_sane_readahead() is disabled. It can later be removed > >

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-12 Thread Jan Kara
On Wed 11-12-13 15:05:22, Andrew Morton wrote: On Wed, 11 Dec 2013 23:49:17 +0100 Jan Kara j...@suse.cz wrote: /* - * Given a desired number of PAGE_CACHE_SIZE readahead pages, return a - * sensible upper limit. + * max_sane_readahead() is disabled. It can later be removed

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-11 Thread Andrew Morton
On Wed, 11 Dec 2013 23:49:17 +0100 Jan Kara wrote: > > /* > > - * Given a desired number of PAGE_CACHE_SIZE readahead pages, return a > > - * sensible upper limit. > > + * max_sane_readahead() is disabled. It can later be removed altogether, > > but > > + * let's keep a skeleton in place for

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-11 Thread Jan Kara
On Wed 04-12-13 13:48:38, Andrew Morton wrote: > On Wed, 04 Dec 2013 14:38:11 +0530 Raghavendra K T > wrote: > > > On 12/04/2013 02:11 PM, Andrew Morton wrote: > > > On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T > > > wrote: > > > > > >> Unfaortunately, from my search, I saw that the

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-11 Thread Jan Kara
On Wed 04-12-13 13:48:38, Andrew Morton wrote: On Wed, 04 Dec 2013 14:38:11 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 12/04/2013 02:11 PM, Andrew Morton wrote: On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote:

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-11 Thread Andrew Morton
On Wed, 11 Dec 2013 23:49:17 +0100 Jan Kara j...@suse.cz wrote: /* - * Given a desired number of PAGE_CACHE_SIZE readahead pages, return a - * sensible upper limit. + * max_sane_readahead() is disabled. It can later be removed altogether, but + * let's keep a skeleton in place for

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Raghavendra K T
On 12/05/2013 03:18 AM, Andrew Morton wrote: On Wed, 04 Dec 2013 14:38:11 +0530 Raghavendra K T wrote: On 12/04/2013 02:11 PM, Andrew Morton wrote: : : This patch takes it all out and applies the same upper limit as is used in : sys_readahead() - half the inactive list. : : +/* : +

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Andrew Morton
On Wed, 04 Dec 2013 14:38:11 +0530 Raghavendra K T wrote: > On 12/04/2013 02:11 PM, Andrew Morton wrote: > > On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T > > wrote: > > > >> Unfaortunately, from my search, I saw that the code belonged to pre git > >> time, so could not get much

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Raghavendra K T
On 12/04/2013 02:11 PM, Andrew Morton wrote: On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T wrote: Unfaortunately, from my search, I saw that the code belonged to pre git time, so could not get much information on that. Here: https://lkml.org/lkml/2004/8/20/242 It seems it was done as

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Andrew Morton
On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T wrote: > > I don't recall the rationale for the current code and of course we > > didn't document it. It might be in the changelogs somewhere - could > > you please do the git digging and see if you can find out? > > Unfaortunately, from my

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Raghavendra K T
Thank you Andrew. On 12/04/2013 04:08 AM, Andrew Morton wrote: On Tue, 3 Dec 2013 16:06:17 +0530 Raghavendra K T wrote: On a cpu with an empty numa node, This makes no sense - numa nodes don't reside on CPUs. I think you mean "on a CPU which resides on a memoryless NUMA node"? You

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Raghavendra K T
Thank you Andrew. On 12/04/2013 04:08 AM, Andrew Morton wrote: On Tue, 3 Dec 2013 16:06:17 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On a cpu with an empty numa node, This makes no sense - numa nodes don't reside on CPUs. I think you mean on a CPU which resides on a

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Andrew Morton
On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: I don't recall the rationale for the current code and of course we didn't document it. It might be in the changelogs somewhere - could you please do the git digging and see if you can find out?

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Raghavendra K T
On 12/04/2013 02:11 PM, Andrew Morton wrote: On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: Unfaortunately, from my search, I saw that the code belonged to pre git time, so could not get much information on that. Here:

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Andrew Morton
On Wed, 04 Dec 2013 14:38:11 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 12/04/2013 02:11 PM, Andrew Morton wrote: On Wed, 04 Dec 2013 14:00:09 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: Unfaortunately, from my search, I saw that the code

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-04 Thread Raghavendra K T
On 12/05/2013 03:18 AM, Andrew Morton wrote: On Wed, 04 Dec 2013 14:38:11 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On 12/04/2013 02:11 PM, Andrew Morton wrote: : : This patch takes it all out and applies the same upper limit as is used in : sys_readahead() -

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-03 Thread Andrew Morton
On Tue, 3 Dec 2013 16:06:17 +0530 Raghavendra K T wrote: > On a cpu with an empty numa node, This makes no sense - numa nodes don't reside on CPUs. I think you mean "on a CPU which resides on a memoryless NUMA node"? > readahead fails because max_sane_readahead > returns zero. The reason is

[PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-03 Thread Raghavendra K T
On a cpu with an empty numa node, readahead fails because max_sane_readahead returns zero. The reason is we look into number of inactive + free pages available on the current node. The following patch tries to fix the behaviour by checking for potential empty numa node cases. The rationale for

[PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-03 Thread Raghavendra K T
On a cpu with an empty numa node, readahead fails because max_sane_readahead returns zero. The reason is we look into number of inactive + free pages available on the current node. The following patch tries to fix the behaviour by checking for potential empty numa node cases. The rationale for

Re: [PATCH RFC] mm readahead: Fix the readahead fail in case of empty numa node

2013-12-03 Thread Andrew Morton
On Tue, 3 Dec 2013 16:06:17 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: On a cpu with an empty numa node, This makes no sense - numa nodes don't reside on CPUs. I think you mean on a CPU which resides on a memoryless NUMA node? readahead fails because max_sane_readahead