[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200501154853.bca4cfb7b2558bd43a4942f3@linux-foundation.org>
Date: Fri, 1 May 2020 15:48:53 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Wei Yang <richard.weiyang@...il.com>
Cc: ying.huang@...el.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH 3/3] mm/swapfile.c: count won't be bigger than
SWAP_MAP_MAX
On Fri, 1 May 2020 01:52:59 +0000 Wei Yang <richard.weiyang@...il.com> wrote:
> When the condition is true, there are two possibilities:
I'm struggling with this one.
> 1. count == SWAP_MAP_BAD
> 2. count == (SWAP_MAP_MAX & COUNT_CONTINUED) == SWAP_MAP_SHMEM
I'm not sure what 2. is trying to say. For a start, (SWAP_MAP_MAX &
COUNT_CONTINUED) is zero. I guess it meant "|"?
Also, the return value documentation says we return EINVAL for migration
entries. Where's that happening, or is the comment out of date?
> The first case would be filtered by the first if in __swap_duplicate().
>
> And the second case means this swap entry is for shmem. Since we never
> do another duplication for shmem swap entry. This won't happen neither.
Powered by blists - more mailing lists