Re: [PATCH] mm: slub: fix page->_count corruption (again)

2014-01-29 Thread David Rientjes
On Tue, 28 Jan 2014, Dave Hansen wrote: > It has measurable performance benefits, and the benefits go up as the > cost of en/disabling interrupts goes up (like if it takes you a hypercall). > > Fengguang, could you run a set of tests for the top patch in this branch > to see if we'd be giving

Re: [PATCH] mm: slub: fix page->_count corruption (again)

2014-01-29 Thread Fengguang Wu
Hi Dave, > > Fengguang, could you run a set of tests for the top patch in this branch > > to see if we'd be giving much up by axing the code? > > > > > > https://github.com/hansendc/linux/tree/slub-nocmpxchg-for-Fengguang-20140128 > > Sure, I've queued tests for the branch. Will report

Re: [PATCH] mm: slub: fix page-_count corruption (again)

2014-01-29 Thread Fengguang Wu
Hi Dave, Fengguang, could you run a set of tests for the top patch in this branch to see if we'd be giving much up by axing the code? https://github.com/hansendc/linux/tree/slub-nocmpxchg-for-Fengguang-20140128 Sure, I've queued tests for the branch. Will report back after 1-2

Re: [PATCH] mm: slub: fix page-_count corruption (again)

2014-01-29 Thread David Rientjes
On Tue, 28 Jan 2014, Dave Hansen wrote: It has measurable performance benefits, and the benefits go up as the cost of en/disabling interrupts goes up (like if it takes you a hypercall). Fengguang, could you run a set of tests for the top patch in this branch to see if we'd be giving much up

Re: [PATCH] mm: slub: fix page->_count corruption (again)

2014-01-28 Thread Fengguang Wu
On Tue, Jan 28, 2014 at 03:52:47PM -0800, Dave Hansen wrote: > On 01/28/2014 03:29 PM, Andrew Morton wrote: > > On Tue, 28 Jan 2014 15:17:22 -0800 Dave Hansen wrote: > > This code is borderline insane. > > No argument here. > > > Yes, struct page is special and it's worth spending time and

Re: [PATCH] mm: slub: fix page->_count corruption (again)

2014-01-28 Thread Dave Hansen
On 01/28/2014 03:29 PM, Andrew Morton wrote: > On Tue, 28 Jan 2014 15:17:22 -0800 Dave Hansen wrote: > This code is borderline insane. No argument here. > Yes, struct page is special and it's worth spending time and doing > weird things to optimise it. But sheesh. > > An alternative is to

Re: [PATCH] mm: slub: fix page->_count corruption (again)

2014-01-28 Thread Andrew Morton
On Tue, 28 Jan 2014 15:17:22 -0800 Dave Hansen wrote: > Commit abca7c496 notes that we can not _set_ a page->counters > directly, except when using a real double-cmpxchg. Doing so can > lose updates to ->_count. > > That an absolute rule: > > You may not *set* page->counters except

[PATCH] mm: slub: fix page->_count corruption (again)

2014-01-28 Thread Dave Hansen
From: Dave Hansen Commit abca7c496 notes that we can not _set_ a page->counters directly, except when using a real double-cmpxchg. Doing so can lose updates to ->_count. That an absolute rule: You may not *set* page->counters except via a cmpxchg. Commit abca7c496 fixed this for the

[PATCH] mm: slub: fix page-_count corruption (again)

2014-01-28 Thread Dave Hansen
From: Dave Hansen dave.han...@linux.intel.com Commit abca7c496 notes that we can not _set_ a page-counters directly, except when using a real double-cmpxchg. Doing so can lose updates to -_count. That an absolute rule: You may not *set* page-counters except via a cmpxchg. Commit

Re: [PATCH] mm: slub: fix page-_count corruption (again)

2014-01-28 Thread Andrew Morton
On Tue, 28 Jan 2014 15:17:22 -0800 Dave Hansen d...@sr71.net wrote: Commit abca7c496 notes that we can not _set_ a page-counters directly, except when using a real double-cmpxchg. Doing so can lose updates to -_count. That an absolute rule: You may not *set* page-counters except

Re: [PATCH] mm: slub: fix page-_count corruption (again)

2014-01-28 Thread Dave Hansen
On 01/28/2014 03:29 PM, Andrew Morton wrote: On Tue, 28 Jan 2014 15:17:22 -0800 Dave Hansen d...@sr71.net wrote: This code is borderline insane. No argument here. Yes, struct page is special and it's worth spending time and doing weird things to optimise it. But sheesh. An alternative is

Re: [PATCH] mm: slub: fix page-_count corruption (again)

2014-01-28 Thread Fengguang Wu
On Tue, Jan 28, 2014 at 03:52:47PM -0800, Dave Hansen wrote: On 01/28/2014 03:29 PM, Andrew Morton wrote: On Tue, 28 Jan 2014 15:17:22 -0800 Dave Hansen d...@sr71.net wrote: This code is borderline insane. No argument here. Yes, struct page is special and it's worth spending time and