All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang\, Ying" <ying.huang@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Minchan Kim <minchan@kernel.org>,
	stable@vger.kernel.org, Christian Kujau <lists@nerdbynature.de>
Subject: Re: [PATCH -mm] mm, swap: Fix false error message in __swp_swapcount()
Date: Tue, 24 Oct 2017 23:34:11 +0800	[thread overview]
Message-ID: <87mv4gpnkc.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20171024153037.gjemriarubzoqai5@dhcp22.suse.cz> (Michal Hocko's message of "Tue, 24 Oct 2017 17:30:37 +0200")

Michal Hocko <mhocko@kernel.org> writes:

> On Tue 24-10-17 23:15:32, Huang, Ying wrote:
>> Hi, Michal,
>> 
>> Michal Hocko <mhocko@kernel.org> writes:
>> 
>> > On Tue 24-10-17 10:47:00, Huang, Ying wrote:
>> >> From: Ying Huang <ying.huang@intel.com>
>> >> 
>> >> __swp_swapcount() is used in __read_swap_cache_async().  Where the
>> >> invalid swap entry (offset > max) may be supplied during swap
>> >> readahead.  But __swp_swapcount() will print error message for these
>> >> expected invalid swap entry as below, which will make the users
>> >> confusing.
>> >   ^^
>> > confused... And I have to admit this changelog has left me confused as
>> > well. What is an invalid swap entry in the readahead? Ohh, let me
>> > re-real Fixes: commit. It didn't really help "We can avoid needlessly
>> > allocating page for swap slots that are not used by anyone.  No pages
>> > have to be read in for these slots."
>> >
>> > Could you be more specific about when and how this happens please?
>> 
>> Sorry for confusing.
>> 
>> When page fault occurs for a swap entry, the original swap readahead
>> (not new VMA base swap readahead) may readahead several swap entries
>> after the fault swap entry.  The readahead algorithm calculates some of
>> the swap entries to readahead via increasing the offset of the fault
>> swap entry without checking whether they are beyond the end of the swap
>> device and it rely on the __swp_swapcount() and swapcache_prepare() to
>> check it.  Although __swp_swapcount() checks for the swap entry passed
>> in, it will complain with error message for the expected invalid swap
>> entry.  This makes the end user confusing.
>> 
>> Is this a little clearer.
>
> yes, this makes more sense (modulo the same typo ;)). Can you make this
> information into the changelog please? Thanks.

Oh, Yes!  I should fix it.  Sure, I will add this into the changelog.

Best Regards,
Huang, Ying

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

WARNING: multiple messages have this Message-ID (diff)
From: "Huang\, Ying" <ying.huang@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Huang\, Ying" <ying.huang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Minchan Kim <minchan@kernel.org>, <stable@vger.kernel.org>,
	Christian Kujau <lists@nerdbynature.de>
Subject: Re: [PATCH -mm] mm, swap: Fix false error message in __swp_swapcount()
Date: Tue, 24 Oct 2017 23:34:11 +0800	[thread overview]
Message-ID: <87mv4gpnkc.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20171024153037.gjemriarubzoqai5@dhcp22.suse.cz> (Michal Hocko's message of "Tue, 24 Oct 2017 17:30:37 +0200")

Michal Hocko <mhocko@kernel.org> writes:

> On Tue 24-10-17 23:15:32, Huang, Ying wrote:
>> Hi, Michal,
>> 
>> Michal Hocko <mhocko@kernel.org> writes:
>> 
>> > On Tue 24-10-17 10:47:00, Huang, Ying wrote:
>> >> From: Ying Huang <ying.huang@intel.com>
>> >> 
>> >> __swp_swapcount() is used in __read_swap_cache_async().  Where the
>> >> invalid swap entry (offset > max) may be supplied during swap
>> >> readahead.  But __swp_swapcount() will print error message for these
>> >> expected invalid swap entry as below, which will make the users
>> >> confusing.
>> >   ^^
>> > confused... And I have to admit this changelog has left me confused as
>> > well. What is an invalid swap entry in the readahead? Ohh, let me
>> > re-real Fixes: commit. It didn't really help "We can avoid needlessly
>> > allocating page for swap slots that are not used by anyone.  No pages
>> > have to be read in for these slots."
>> >
>> > Could you be more specific about when and how this happens please?
>> 
>> Sorry for confusing.
>> 
>> When page fault occurs for a swap entry, the original swap readahead
>> (not new VMA base swap readahead) may readahead several swap entries
>> after the fault swap entry.  The readahead algorithm calculates some of
>> the swap entries to readahead via increasing the offset of the fault
>> swap entry without checking whether they are beyond the end of the swap
>> device and it rely on the __swp_swapcount() and swapcache_prepare() to
>> check it.  Although __swp_swapcount() checks for the swap entry passed
>> in, it will complain with error message for the expected invalid swap
>> entry.  This makes the end user confusing.
>> 
>> Is this a little clearer.
>
> yes, this makes more sense (modulo the same typo ;)). Can you make this
> information into the changelog please? Thanks.

Oh, Yes!  I should fix it.  Sure, I will add this into the changelog.

Best Regards,
Huang, Ying

WARNING: multiple messages have this Message-ID (diff)
From: "Huang\, Ying" <ying.huang@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Huang\, Ying" <ying.huang@intel.com>,
	 Andrew Morton <akpm@linux-foundation.org>,  <linux-mm@kvack.org>,
	 <linux-kernel@vger.kernel.org>,
	 Tim Chen <tim.c.chen@linux.intel.com>,
	 Minchan Kim <minchan@kernel.org>,  <stable@vger.kernel.org>,
	 Christian Kujau <lists@nerdbynature.de>
Subject: Re: [PATCH -mm] mm, swap: Fix false error message in __swp_swapcount()
Date: Tue, 24 Oct 2017 23:34:11 +0800	[thread overview]
Message-ID: <87mv4gpnkc.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20171024153037.gjemriarubzoqai5@dhcp22.suse.cz> (Michal Hocko's message of "Tue, 24 Oct 2017 17:30:37 +0200")

Michal Hocko <mhocko@kernel.org> writes:

> On Tue 24-10-17 23:15:32, Huang, Ying wrote:
>> Hi, Michal,
>> 
>> Michal Hocko <mhocko@kernel.org> writes:
>> 
>> > On Tue 24-10-17 10:47:00, Huang, Ying wrote:
>> >> From: Ying Huang <ying.huang@intel.com>
>> >> 
>> >> __swp_swapcount() is used in __read_swap_cache_async().  Where the
>> >> invalid swap entry (offset > max) may be supplied during swap
>> >> readahead.  But __swp_swapcount() will print error message for these
>> >> expected invalid swap entry as below, which will make the users
>> >> confusing.
>> >   ^^
>> > confused... And I have to admit this changelog has left me confused as
>> > well. What is an invalid swap entry in the readahead? Ohh, let me
>> > re-real Fixes: commit. It didn't really help "We can avoid needlessly
>> > allocating page for swap slots that are not used by anyone.  No pages
>> > have to be read in for these slots."
>> >
>> > Could you be more specific about when and how this happens please?
>> 
>> Sorry for confusing.
>> 
>> When page fault occurs for a swap entry, the original swap readahead
>> (not new VMA base swap readahead) may readahead several swap entries
>> after the fault swap entry.  The readahead algorithm calculates some of
>> the swap entries to readahead via increasing the offset of the fault
>> swap entry without checking whether they are beyond the end of the swap
>> device and it rely on the __swp_swapcount() and swapcache_prepare() to
>> check it.  Although __swp_swapcount() checks for the swap entry passed
>> in, it will complain with error message for the expected invalid swap
>> entry.  This makes the end user confusing.
>> 
>> Is this a little clearer.
>
> yes, this makes more sense (modulo the same typo ;)). Can you make this
> information into the changelog please? Thanks.

Oh, Yes!  I should fix it.  Sure, I will add this into the changelog.

Best Regards,
Huang, Ying

--
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:[~2017-10-24 15:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  2:47 [PATCH -mm] mm, swap: Fix false error message in __swp_swapcount() Huang, Ying
2017-10-24  2:47 ` Huang, Ying
2017-10-24  8:38 ` Michal Hocko
2017-10-24  8:38   ` Michal Hocko
2017-10-24 15:15   ` Huang, Ying
2017-10-24 15:15     ` Huang, Ying
2017-10-24 15:15     ` Huang, Ying
2017-10-24 15:30     ` Michal Hocko
2017-10-24 15:30       ` Michal Hocko
2017-10-24 15:34       ` Huang, Ying [this message]
2017-10-24 15:34         ` Huang, Ying
2017-10-24 15:34         ` Huang, Ying
2017-10-24 20:17 ` Minchan Kim
2017-10-24 20:17   ` Minchan Kim
2017-10-25  2:32   ` Huang, Ying
2017-10-25  2:32     ` Huang, Ying
2017-10-25  2:32     ` Huang, Ying

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=87mv4gpnkc.fsf@yhuang-dev.intel.com \
    --to=ying.huang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lists@nerdbynature.de \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tim.c.chen@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.