[lkml]   [2013]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 3/8] mm, mempolicy: remove per-process flag
On Wed, 4 Dec 2013, Christoph Lameter wrote:

> > PF_MEMPOLICY is an unnecessary optimization for CONFIG_SLAB users.
> > There's no significant performance degradation to checking
> > current->mempolicy rather than current->flags & PF_MEMPOLICY in the
> > allocation path, especially since this is considered unlikely().
> The use of current->mempolicy increase the cache footprint since its in a
> rarely used cacheline. This performance issue would occur when memory
> policies are not used since that cacheline would then have to be touched
> regardless of memory policies be in effect or not. PF_MEMPOLICY was used
> to avoid touching the cacheline.

Right, but it turns out not to matter in practice. As one of the non-
default CONFIG_SLAB users, and PF_MEMPOLICY only does something for
CONFIG_SLAB, this patch tested to not show any degradation for specjbb
which stresses the allocator in terms of throughput:

with patch: 128761.54 SPECjbb2005 bops
without patch: 127576.65 SPECjbb2005 bops

These per-process flags are a scarce resource so I don't think
PF_MEMPOLICY warrants a bit when it's not shown to be advantageous in
configurations without mempolicy usage where it's intended to optimize,
especially for a non-default slab allocator.

 \ /
  Last update: 2013-12-05 02:41    [W:0.114 / U:4.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site