linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: Hugh Dickins <hughd@google.com>
Cc: Chen Yucong <slaoub@gmail.com>,
	akpm@linux-foundation.org, ddstreet@ieee.org, mgorman@suse.de,
	k.kozlowski@samsung.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] swap: Avoid scanning invalidated region for cheap seek
Date: Fri, 30 May 2014 15:41:45 +0800	[thread overview]
Message-ID: <20140530074145.GA2688@kernel.org> (raw)
In-Reply-To: <alpine.LSU.2.11.1405272037080.1126@eggly.anvils>

On Tue, May 27, 2014 at 08:53:00PM -0700, Hugh Dickins wrote:
> On Mon, 26 May 2014, Chen Yucong wrote:
> 
> > For cheap seek, when we scan the region between si->lowset_bit
> > and scan_base, if san_base is greater than si->highest_bit, the
> > scan operation between si->highest_bit and scan_base is not
> > unnecessary.
> > 
> > This patch can be used to avoid scanning invalidated region for
> > cheap seek.
> > 
> > Signed-off-by: Chen Yucong <slaoub@gmail.com>
> 
> I was going to suggest that you are adding a little code to a common
> path, in order to optimize a very unlikely case: which does not seem
> worthwhile to me.
> 
> But digging a little deeper, I think you have hit upon something more
> interesting (though still in no need of your patch): it looks to me
> like that is not even a common path, but dead code.
> 
> Shaohua, am I missing something, or does all SWP_SOLIDSTATE "seek is
> cheap" now go your si->cluster_info scan_swap_map_try_ssd_cluster()
> route?  So that the "last_in_cluster < scan_base" loop in the body
> of scan_swap_map() is just redundant, and should have been deleted?

Sorry for the delay, you are right. SSD case always goes
scan_swap_map_try_ssd_cluster, otherwise we just scan from lowest_bit to
highest_bit, so the "last_in_cluster < scan_base" loop is dead.

Yucong, can you resent a patch to delete it as Hugh suggested?

Thanks,
Shaohua

--
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:[~2014-05-30  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26  2:00 [PATCH] swap: Avoid scanning invalidated region for cheap seek Chen Yucong
2014-05-28  3:53 ` Hugh Dickins
2014-05-30  7:41   ` Shaohua Li [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=20140530074145.GA2688@kernel.org \
    --to=shli@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ddstreet@ieee.org \
    --cc=hughd@google.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=slaoub@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).