lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Feb 2015 15:52:06 +0200
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Jerome Marchand <jmarchan@...hat.com>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Dave Hansen <dave.hansen@...el.com>,
	Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Christoph Lameter <cl@...two.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Steve Capper <steve.capper@...aro.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCHv3 05/24] mm, proc: adjust PSS calculation

On Fri, Feb 20, 2015 at 06:31:15PM +0100, Jerome Marchand wrote:
> On 02/12/2015 05:18 PM, Kirill A. Shutemov wrote:
> > With new refcounting all subpages of the compound page are not nessessary
> > have the same mapcount. We need to take into account mapcount of every
> > sub-page.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > ---
> >  fs/proc/task_mmu.c | 43 ++++++++++++++++++++++---------------------
> >  1 file changed, 22 insertions(+), 21 deletions(-)
> > 
> > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> > index 98826d08a11b..8a0a78174cc6 100644
> > --- a/fs/proc/task_mmu.c
> > +++ b/fs/proc/task_mmu.c
> > @@ -449,9 +449,10 @@ struct mem_size_stats {
> >  };
> >  
> >  static void smaps_account(struct mem_size_stats *mss, struct page *page,
> > -		unsigned long size, bool young, bool dirty)
> > +		bool compound, bool young, bool dirty)
> >  {
> > -	int mapcount;
> > +	int i, nr = compound ? hpage_nr_pages(page) : 1;
> > +	unsigned long size = 1UL << nr;
> 
> Shouldn't that be:
> 	unsigned long size = nr << PAGE_SHIFT;

Yes, thanks you.

-- 
 Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ