lkml.org 
[lkml]   [2006]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] use local_t for page statistics
Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
> Andrew Morton wrote:
> > Benjamin LaHaise <bcrl@kvack.org> wrote:
> >
> >>The patch below converts the mm page_states counters to use local_t.
> >>mod_page_state shows up in a few profiles on x86 and x86-64 due to the
> >>disable/enable interrupts operations touching the flags register. On
> >>both my laptop (Pentium M) and P4 test box this results in about 10
> >>additional /bin/bash -c exit 0 executions per second (P4 went from ~759/s
> >>to ~771/s). Tested on x86 and x86-64. Oh, also add a pgcow statistic
> >>for the number of COW page faults.
> >
> >
> > Bah. I think this is a better approach than the just-merged
> > mm-page_state-opt.patch, so I should revert that patch first?
> >
>
> No. On many load/store architectures there is no good way to do local_t,
> so something like ppc32 or ia64 just uses all atomic operations for
> local_t, and ppc64 uses 3 counters per-cpu thus tripling the cache
> footprint.
>

Yes, local_t seems a bit half-assed at present. And a bit broken with
interrupt nesting.

Surely 64-bit architectures would be better off using atomic64_t rather
than that v[3] monstrosity.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-07 04:09    [W:2.499 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site