linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Bongkyu Kim <bongkyu.kim@lge.com>
Subject: Re: [PATCH] mm: show proportional swap share of the mapping
Date: Wed, 10 Jun 2015 09:11:51 +0900	[thread overview]
Message-ID: <20150610001151.GD13376@bgram> (raw)
In-Reply-To: <20150610000609.GA596@swordfish>

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2015-06-10  0:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 14:43 [PATCH] mm: show proportional swap share of the mapping Minchan Kim
2015-06-09 21:35 ` Andrew Morton
2015-06-09 23:36   ` Minchan Kim
2015-06-10  0:06 ` Sergey Senozhatsky
2015-06-10  0:11   ` Minchan Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150610001151.GD13376@bgram \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bongkyu.kim@lge.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).