Re: [PATCH] mm: show proportional swap share of the mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]