From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424457AbcFHQG7 (ORCPT ); Wed, 8 Jun 2016 12:06:59 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35700 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423726AbcFHQG4 (ORCPT ); Wed, 8 Jun 2016 12:06:56 -0400 Date: Wed, 8 Jun 2016 18:06:53 +0200 From: Michal Hocko To: Dave Hansen Cc: Lukasz Odzioba , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, aarcange@redhat.com, vdavydov@parallels.com, mingli199x@qq.com, minchan@kernel.org, lukasz.anaczkowski@intel.com Subject: Re: [PATCH 1/1] mm/swap.c: flush lru_add pvecs on compound page arrival Message-ID: <20160608160653.GB21838@dhcp22.suse.cz> References: <1465396537-17277-1-git-send-email-lukasz.odzioba@intel.com> <57583A49.30809@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57583A49.30809@intel.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 08-06-16 08:31:21, Dave Hansen wrote: > On 06/08/2016 07:35 AM, Lukasz Odzioba wrote: > > diff --git a/mm/swap.c b/mm/swap.c > > index 9591614..3fe4f18 100644 > > --- a/mm/swap.c > > +++ b/mm/swap.c > > @@ -391,9 +391,8 @@ static void __lru_cache_add(struct page *page) > > struct pagevec *pvec = &get_cpu_var(lru_add_pvec); > > > > get_page(page); > > - if (!pagevec_space(pvec)) > > + if (!pagevec_add(pvec, page) || PageCompound(page)) > > __pagevec_lru_add(pvec); > > - pagevec_add(pvec, page); > > put_cpu_var(lru_add_pvec); > > } > > Lukasz, > > Do we have any statistics that tell us how many pages are sitting the > lru pvecs? Although this helps the problem overall, don't we still have > a problem with memory being held in such an opaque place? Is it really worth bothering when we are talking about 56kB per CPU (after this patch)? -- Michal Hocko SUSE Labs