linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mm,swap: cleanup VMA based swap readahead window calculation
@ 2024-05-31  8:12 Huang Ying
  2024-05-31  8:12 ` [PATCH 1/3] mm,swap: fix a theoretical underflow in " Huang Ying
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Huang Ying @ 2024-05-31  8:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Huang Ying, Hugh Dickins,
	Alistair Popple, Anshuman Khandual, David Hildenbrand,
	Mel Gorman, Miaohe Lin, Minchan Kim, Ryan Roberts, Yang Shi,
	Yu Zhao, Kairui Song, Barry Song, Chris Li, Yosry Ahmed

From: "Huang Ying" <ying.huang@intel.com>

When VMA based swap readahead is introduced in commit ec560175c0b6
("mm, swap: VMA based swap readahead"), "struct vma_swap_readahead" is
defined to describe the readahead window.  Because we wanted to save
the PTE entries in the struct at that time.  But after commit
4f8fcf4ced0b ("mm/swap: swap_vma_readahead() do the
pte_offset_map()"), we no longer save PTE entries in the struct.  The
size of the struct becomes so small, that it's better to use the
fields of the struct directly.  This can simplify the code to improve
the code readability.  The line number of source code reduces too.

A theoretical underflow issue and some related code cleanup is done in
the series too.

Best Regards,
Huang, Ying


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-31  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31  8:12 [PATCH 0/3] mm,swap: cleanup VMA based swap readahead window calculation Huang Ying
2024-05-31  8:12 ` [PATCH 1/3] mm,swap: fix a theoretical underflow in " Huang Ying
2024-05-31  8:12 ` [PATCH 2/3] mm,swap: remove struct vma_swap_readahead Huang Ying
2024-05-31  8:12 ` [PATCH 3/3] mm,swap: simplify VMA based swap readahead window calculation Huang Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox