Re: [PATCH] NUMA policies in the slab allocator V2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 18 Nov 2005, Andi Kleen wrote:

> On Friday 18 November 2005 02:51, Christoph Lameter wrote:
> > This patch fixes a regression in 2.6.14 against 2.6.13 that causes an
> > imbalance in memory allocation during bootup.
> 
> I still think it's wrongly implemented. We shouldn't be slowing down the slab 
> fast path for this. Also BTW if anything your check would need to be 
> dependent on !in_interrupt(), otherwise the policy of slab allocations
> in interrupt context will change randomly based on what the current
> process is doing (that's wrong, interrupts should be always local)
> But of course that would make the fast path even slower ...

We can add that check to slab_node() to avoid these issues and it will be 
out of the fast path then. I would like to hear about alternatives to 
this. You really want to run the useless fastpath? Examine lists etc for 
the local node despite the policy telling you to get off node?

Hmm. Is a hugepage ever allocated from interrupt context? We may have the 
same issues there.

Index: linux-2.6/mm/mempolicy.c
===================================================================
--- linux-2.6.orig/mm/mempolicy.c	2005-11-17 19:30:10.862617183 -0800
+++ linux-2.6/mm/mempolicy.c	2005-11-17 19:31:47.040578059 -0800
@@ -774,6 +774,9 @@
  */
 unsigned slab_node(struct mempolicy *policy)
 {
+	if (in_interrupt())
+		return numa_node_id();
+
 	switch (policy->policy) {
 	case MPOL_INTERLEAVE:
 		return interleave_nodes(policy);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux