Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-25 Thread Kirill A. Shutemov
On Thu, Oct 25, 2012 at 02:37:07PM -0700, Andrew Morton wrote: > On Fri, 26 Oct 2012 00:22:51 +0300 > "Kirill A. Shutemov" wrote: > > > On Thu, Oct 25, 2012 at 02:05:24PM -0700, Andrew Morton wrote: > > > hm. It's odd that the kernel didn't try to shrink slabs in this case. > > > Why didn't it?

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-25 Thread Andrew Morton
On Fri, 26 Oct 2012 00:22:51 +0300 "Kirill A. Shutemov" wrote: > On Thu, Oct 25, 2012 at 02:05:24PM -0700, Andrew Morton wrote: > > On Thu, 25 Oct 2012 23:49:59 +0300 > > "Kirill A. Shutemov" wrote: > > > > > On Wed, Oct 24, 2012 at 01:25:52PM -0700, Andrew Morton wrote: > > > > On Wed, 24 Oct

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-25 Thread Kirill A. Shutemov
On Thu, Oct 25, 2012 at 02:05:24PM -0700, Andrew Morton wrote: > On Thu, 25 Oct 2012 23:49:59 +0300 > "Kirill A. Shutemov" wrote: > > > On Wed, Oct 24, 2012 at 01:25:52PM -0700, Andrew Morton wrote: > > > On Wed, 24 Oct 2012 22:45:52 +0300 > > > "Kirill A. Shutemov" wrote: > > > > > > > On Wed,

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-25 Thread Andrew Morton
On Thu, 25 Oct 2012 23:49:59 +0300 "Kirill A. Shutemov" wrote: > On Wed, Oct 24, 2012 at 01:25:52PM -0700, Andrew Morton wrote: > > On Wed, 24 Oct 2012 22:45:52 +0300 > > "Kirill A. Shutemov" wrote: > > > > > On Wed, Oct 24, 2012 at 12:22:53PM -0700, Andrew Morton wrote: > > > > > > > > I'm th

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-25 Thread Kirill A. Shutemov
On Wed, Oct 24, 2012 at 01:25:52PM -0700, Andrew Morton wrote: > On Wed, 24 Oct 2012 22:45:52 +0300 > "Kirill A. Shutemov" wrote: > > > On Wed, Oct 24, 2012 at 12:22:53PM -0700, Andrew Morton wrote: > > > > > > I'm thinking that such a workload would be the above dd in parallel > > > with a smal

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-24 Thread Andi Kleen
> Andrea Revieved-by previous version of the patchset, but I've dropped the > tag after rebase to v3.7-rc1 due not-so-trivial conflicts. Patches 2, 3, > 4, 7, 10 had conflicts. Mostly due new MMU notifiers interface. I reviewed it too, but I probably do not count as a real MM person. -Andi -- To

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-24 Thread Kirill A. Shutemov
On Wed, Oct 24, 2012 at 01:25:52PM -0700, Andrew Morton wrote: > On Wed, 24 Oct 2012 22:45:52 +0300 > "Kirill A. Shutemov" wrote: > > > On Wed, Oct 24, 2012 at 12:22:53PM -0700, Andrew Morton wrote: > > > > > > I'm thinking that such a workload would be the above dd in parallel > > > with a smal

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-24 Thread Andrew Morton
On Wed, 24 Oct 2012 22:45:52 +0300 "Kirill A. Shutemov" wrote: > On Wed, Oct 24, 2012 at 12:22:53PM -0700, Andrew Morton wrote: > > > > I'm thinking that such a workload would be the above dd in parallel > > with a small app which touches the huge page and then exits, then gets > > executed agai

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-24 Thread Kirill A. Shutemov
On Wed, Oct 24, 2012 at 12:22:53PM -0700, Andrew Morton wrote: > On Wed, 24 Oct 2012 02:38:01 +0300 > "Kirill A. Shutemov" wrote: > > > On Tue, Oct 23, 2012 at 03:59:15PM -0700, Andrew Morton wrote: > > > On Tue, 23 Oct 2012 10:00:18 +0300 > > > "Kirill A. Shutemov" wrote: > > > > > > > > Well,

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-24 Thread Andrew Morton
On Wed, 24 Oct 2012 02:38:01 +0300 "Kirill A. Shutemov" wrote: > On Tue, Oct 23, 2012 at 03:59:15PM -0700, Andrew Morton wrote: > > On Tue, 23 Oct 2012 10:00:18 +0300 > > "Kirill A. Shutemov" wrote: > > > > > > Well, how hard is it to trigger the bad behavior? One can easily > > > > create a s

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-23 Thread Kirill A. Shutemov
On Tue, Oct 23, 2012 at 03:59:15PM -0700, Andrew Morton wrote: > On Tue, 23 Oct 2012 10:00:18 +0300 > "Kirill A. Shutemov" wrote: > > > > Well, how hard is it to trigger the bad behavior? One can easily > > > create a situation in which that page's refcount frequently switches > > > from 0 to 1

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-23 Thread Andrew Morton
On Tue, 23 Oct 2012 10:00:18 +0300 "Kirill A. Shutemov" wrote: > > Well, how hard is it to trigger the bad behavior? One can easily > > create a situation in which that page's refcount frequently switches > > from 0 to 1 and back again. And one can easily create a situation in > > which the shr

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-22 Thread Kirill A. Shutemov
On Mon, Oct 22, 2012 at 11:43:49PM -0700, Andrew Morton wrote: > On Tue, 23 Oct 2012 09:35:32 +0300 "Kirill A. Shutemov" > wrote: > > > On Fri, Oct 19, 2012 at 02:59:41AM +0300, Kirill A. Shutemov wrote: > > > On Thu, Oct 18, 2012 at 04:45:02PM -0700, Andrew Morton wrote: > > > > On Mon, 15 Oct

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-22 Thread Andrew Morton
On Tue, 23 Oct 2012 09:35:32 +0300 "Kirill A. Shutemov" wrote: > On Fri, Oct 19, 2012 at 02:59:41AM +0300, Kirill A. Shutemov wrote: > > On Thu, Oct 18, 2012 at 04:45:02PM -0700, Andrew Morton wrote: > > > On Mon, 15 Oct 2012 09:00:59 +0300 > > > "Kirill A. Shutemov" wrote: > > > > > > > H. Pe

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-22 Thread Kirill A. Shutemov
On Fri, Oct 19, 2012 at 02:59:41AM +0300, Kirill A. Shutemov wrote: > On Thu, Oct 18, 2012 at 04:45:02PM -0700, Andrew Morton wrote: > > On Mon, 15 Oct 2012 09:00:59 +0300 > > "Kirill A. Shutemov" wrote: > > > > > H. Peter Anvin doesn't like huge zero page which sticks in memory forever > > > aft

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-18 Thread Kirill A. Shutemov
On Thu, Oct 18, 2012 at 04:45:02PM -0700, Andrew Morton wrote: > On Mon, 15 Oct 2012 09:00:59 +0300 > "Kirill A. Shutemov" wrote: > > > H. Peter Anvin doesn't like huge zero page which sticks in memory forever > > after the first allocation. Here's implementation of lockless refcounting > > for h

Re: [PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-18 Thread Andrew Morton
On Mon, 15 Oct 2012 09:00:59 +0300 "Kirill A. Shutemov" wrote: > H. Peter Anvin doesn't like huge zero page which sticks in memory forever > after the first allocation. Here's implementation of lockless refcounting > for huge zero page. > > We have two basic primitives: {get,put}_huge_zero_page(

[PATCH v4 10/10] thp: implement refcounting for huge zero page

2012-10-14 Thread Kirill A. Shutemov
From: "Kirill A. Shutemov" H. Peter Anvin doesn't like huge zero page which sticks in memory forever after the first allocation. Here's implementation of lockless refcounting for huge zero page. We have two basic primitives: {get,put}_huge_zero_page(). They manipulate reference counter. If coun