Re: [PATCH] slab/mempolicy: always use local policy from interruptcontext v3

From: Christoph Lameter
Date: Fri Jun 01 2012 - 10:10:12 EST


On Fri, 1 Jun 2012, Pekka Enberg wrote:

> > I think the version proposed by David Mackey is more clear, it makes it
> > obvious that we don't want to dereference current in interrupt context
> > whereas that relies on short-circuiting your conditional in your approach.
>
> I like it better also. Christoph, Andi?

I dont like the conditional in the assignment followed by a test for NULL
which is also not easy to read.

Would prefer that the control flow be redesigned.

Something like

if (in_interrupt())
return numa_node_id();

policy = current->mempolicy
if (!policy || ...)
return numa_node_id();

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