Re: [PATCH] mm: swap: Use memset to fill the swap_map with SWAP_HAS_CACHE

2020-10-25 Thread linmiaohe
Andrew Morton wrote: > On Mon, 21 Sep 2020 08:22:24 -0400 Miaohe Lin wrote: > >> We could use helper memset to fill the swap_map with SWAP_HAS_CACHE >> instead of a direct loop here to simplify the code. Also we can remove >> the local variable i and map this way. >> *slot = swp_entry(si->

Re: [PATCH] mm: swap: Use memset to fill the swap_map with SWAP_HAS_CACHE

2020-10-25 Thread Andrew Morton
On Mon, 21 Sep 2020 08:22:24 -0400 Miaohe Lin wrote: > We could use helper memset to fill the swap_map with SWAP_HAS_CACHE instead > of a direct loop here to simplify the code. Also we can remove the local > variable i and map this way. > > ... > > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@

Re: [PATCH] mm: swap: Use memset to fill the swap_map with SWAP_HAS_CACHE

2020-10-06 Thread linmiaohe
Friendly ping. > We could use helper memset to fill the swap_map with SWAP_HAS_CACHE instead > of a direct loop here to simplify the code. Also we can remove the local > variable i and map this way. > > Signed-off-by: Miaohe Lin > --- > mm/swapfile.c | 7 ++- > 1 file changed, 2 insertions

[PATCH] mm: swap: Use memset to fill the swap_map with SWAP_HAS_CACHE

2020-09-21 Thread Miaohe Lin
We could use helper memset to fill the swap_map with SWAP_HAS_CACHE instead of a direct loop here to simplify the code. Also we can remove the local variable i and map this way. Signed-off-by: Miaohe Lin --- mm/swapfile.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a