linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Do we still need skip swapcache logic in do_swap_page() for SWP_SYNCHRONOUS_IO?
@ 2020-12-17  1:57 Huang, Ying
  2020-12-17 21:02 ` Minchan Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Huang, Ying @ 2020-12-17  1:57 UTC (permalink / raw)
  To: Minchan Kim
  Cc: Joonsoo Kim, Johannes Weiner, Vlastimil Babka, Hugh Dickins,
	Mel Gorman, Michal Hocko, Dan Williams, Christoph Hellwig,
	Ilya Dryomov, Andrew Morton, linux-mm

Hi, Minchan,

In commit 0bcac06f27d7 ("mm, swap: skip swapcache for swapin of
synchronous device"), swap cache management is skipped for super fast
device with synchronous IO.  That did help performance for these devices
much at that time.  But in commit aae466b0052e ("mm/swap: implement
workingset detection for anonymous LRU"), swap cache is used to record
workingset shadow value.  So it needs to be operated anyway in swapin in
common cases.  Although lockless operation get_shadow_from_swap_cache()
is used now, in swap_free() path, swap cache will be locked.  So now, is
it still necessary to skip swap cache logic in do_swap_page() for
SWP_SYNCHRONOUS_IO?  Maybe we can just simplify the logic?

Best Regards,
Huang, Ying


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

* Re: Do we still need skip swapcache logic in do_swap_page() for SWP_SYNCHRONOUS_IO?
  2020-12-17  1:57 Do we still need skip swapcache logic in do_swap_page() for SWP_SYNCHRONOUS_IO? Huang, Ying
@ 2020-12-17 21:02 ` Minchan Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Minchan Kim @ 2020-12-17 21:02 UTC (permalink / raw)
  To: Huang, Ying
  Cc: Joonsoo Kim, Johannes Weiner, Vlastimil Babka, Hugh Dickins,
	Mel Gorman, Michal Hocko, Dan Williams, Christoph Hellwig,
	Ilya Dryomov, Andrew Morton, linux-mm

Hi Huang,

On Thu, Dec 17, 2020 at 09:57:28AM +0800, Huang, Ying wrote:
> Hi, Minchan,
> 
> In commit 0bcac06f27d7 ("mm, swap: skip swapcache for swapin of
> synchronous device"), swap cache management is skipped for super fast
> device with synchronous IO.  That did help performance for these devices
> much at that time.  But in commit aae466b0052e ("mm/swap: implement
> workingset detection for anonymous LRU"), swap cache is used to record
> workingset shadow value.  So it needs to be operated anyway in swapin in
> common cases.  Although lockless operation get_shadow_from_swap_cache()
> is used now, in swap_free() path, swap cache will be locked.  So now, is
> it still necessary to skip swap cache logic in do_swap_page() for
> SWP_SYNCHRONOUS_IO?  Maybe we can just simplify the logic?

Since we have xarray and better swap management(I believe) since then,
could you try to measure swap-in performance?
If the gain is negligible today, we definitely could drop it.

Thank you.


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

end of thread, other threads:[~2020-12-17 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17  1:57 Do we still need skip swapcache logic in do_swap_page() for SWP_SYNCHRONOUS_IO? Huang, Ying
2020-12-17 21:02 ` Minchan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).