lkml.org 
[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 12/15] mm/swap: fix the obsolete comment for SWP_TYPE_SHIFT
From
On 09.05.22 15:14, Miaohe Lin wrote:
> Since commit 3159f943aafd ("xarray: Replace exceptional entries"), there
> is only one bit of 'type' can be shifted up. Update the corresponding
> comment.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> include/linux/swapops.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/swapops.h b/include/linux/swapops.h
> index 7db424e2dcb1..bb7afd03a324 100644
> --- a/include/linux/swapops.h
> +++ b/include/linux/swapops.h
> @@ -13,10 +13,10 @@
> * get good packing density in that tree, so the index should be dense in
> * the low-order bits.
> *
> - * We arrange the `type' and `offset' fields so that `type' is at the seven
> + * We arrange the `type' and `offset' fields so that `type' is at the six
> * high-order bits of the swp_entry_t and `offset' is right-aligned in the
> * remaining bits. Although `type' itself needs only five bits, we allow for
> - * shmem/tmpfs to shift it all up a further two bits: see swp_to_radix_entry().
> + * shmem/tmpfs to shift it all up a further one bit: see swp_to_radix_entry().

Actually, the shift magic is in xa_mk_value() :)

Reviewed-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2022-05-12 15:42    [W:1.226 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site