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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 10 Jun 2015 09:11:51 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Bongkyu Kim <bongkyu.kim@....com>
Subject: Re: [PATCH] mm: show proportional swap share of the mapping

On Wed, Jun 10, 2015 at 09:06:09AM +0900, Sergey Senozhatsky wrote:
> Hello,
> 
> On (06/09/15 23:43), Minchan Kim wrote:
> [..]
> > @@ -446,6 +446,7 @@ struct mem_size_stats {
> >  	unsigned long anonymous_thp;
> >  	unsigned long swap;
> >  	u64 pss;
> > +	u64 swap_pss;
> >  };
> >  
> >  static void smaps_account(struct mem_size_stats *mss, struct page *page,
> > @@ -492,9 +493,20 @@ static void smaps_pte_entry(pte_t *pte, unsigned long addr,
> >  	} else if (is_swap_pte(*pte)) {
> >  		swp_entry_t swpent = pte_to_swp_entry(*pte);
> >  
> > -		if (!non_swap_entry(swpent))
> > +		if (!non_swap_entry(swpent)) {
> > +			int mapcount;
> > +
> >  			mss->swap += PAGE_SIZE;
> > -		else if (is_migration_entry(swpent))
> > +			mapcount = swp_swapcount(swpent);
> 
> I think this will break swapless builds (CONFIG_SWAP=n builds).

Thanks for the catching.
Will fix!

--
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