public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: group info caches set to SLAB_MEM_SPREAD flags.
@ 2011-11-19 22:48 Namjae Jeon
  2011-11-19 23:29 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Namjae Jeon @ 2011-11-19 22:48 UTC (permalink / raw)
  To: tytso; +Cc: linux-kernel, linux-ext4, Namjae Jeon, Amit Sahrawat

If group info caches set to SLAB_MEM_SPREAD flags, the allocation is spread evenly over all the memory nodes when using cpuset.
It is useful because group info caches are long lived.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
---
 fs/ext4/mballoc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index e2d8be8..7aacbbe 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2407,7 +2407,8 @@ static int ext4_groupinfo_create_slab(size_t size)
 				bb_counters[blocksize_bits + 2]);
 
 	cachep = kmem_cache_create(ext4_groupinfo_slab_names[cache_index],
-					slab_size, 0, SLAB_RECLAIM_ACCOUNT,
+					slab_size, 0, SLAB_RECLAIM_ACCOUNT |
+					SLAB_MEM_SPREAD,
 					NULL);
 
 	ext4_groupinfo_caches[cache_index] = cachep;
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: group info caches set to SLAB_MEM_SPREAD flags.
  2011-11-19 22:48 [PATCH] ext4: group info caches set to SLAB_MEM_SPREAD flags Namjae Jeon
@ 2011-11-19 23:29 ` David Rientjes
  2011-11-20  3:35   ` Ted Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2011-11-19 23:29 UTC (permalink / raw)
  To: Namjae Jeon; +Cc: tytso, linux-kernel, linux-ext4, Amit Sahrawat

On Sun, 20 Nov 2011, Namjae Jeon wrote:

> If group info caches set to SLAB_MEM_SPREAD flags, the allocation is 
> spread evenly over all the memory nodes when using cpuset.

Incorrect, it also requires the cpuset to enable cpuset.memory_spread_slab 
which is not the default.

> It is useful because group info caches are long lived.
> 

As mentioned earlier, you should be able to get performance data as a 
result of this change by using any kernel, enabling CONFIG_CPUSETS and 
CONFIG_SLAB, mounting cpusets at runtime, enabling 
cpuset.memory_spread_slab, creating a mempolicy of MPOL_INTERLEAVE over 
all nodes, and then running your comparison benchmark.  This requires no 
modification of the kernel and will determine what performance benefit 
there is by doing this on your own hardware that you're interested in.

If there is convincing data that suggests it's helpful on your hardware, 
then it would make a good case to merge your patch so users don't need to 
set their own mempolicies that do this.  They'll just need to mount 
cpusets and enable cpuset.memory_spread_slab.

Absent that, there's no purpose in adding this flag.  If you're doing it 
just because it's done in other filesystems, mention that in the changelog 
so it can be judged on that criteria rather than pretending like the NUMA 
affinity actually means anything to your environment.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: group info caches set to SLAB_MEM_SPREAD flags.
  2011-11-19 23:29 ` David Rientjes
@ 2011-11-20  3:35   ` Ted Ts'o
  0 siblings, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2011-11-20  3:35 UTC (permalink / raw)
  To: David Rientjes; +Cc: Namjae Jeon, linux-kernel, linux-ext4, Amit Sahrawat

On Sat, Nov 19, 2011 at 03:29:34PM -0800, David Rientjes wrote:
> If there is convincing data that suggests it's helpful on your hardware, 
> then it would make a good case to merge your patch so users don't need to 
> set their own mempolicies that do this.  They'll just need to mount 
> cpusets and enable cpuset.memory_spread_slab.

>From Namjae and Amit have stated, they don't have access to any NUMA
hardware.  If I had to guess they are students or people who are
trying to start a Linux development team at some company or research
institute, and have decided to start by sending cleanup patches.

	       	    	       	     	- Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-20  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 22:48 [PATCH] ext4: group info caches set to SLAB_MEM_SPREAD flags Namjae Jeon
2011-11-19 23:29 ` David Rientjes
2011-11-20  3:35   ` Ted Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox