Re: [PATCH] mm: shmem: implement POSIX_FADV_[WILL|DONT]NEED for shmem
From: Charan Teja Kalla <hidden>
Date: 2021-11-03 12:41:28
Also in:
lkml
Thanks Suren for the reply!! On 11/2/2021 11:42 PM, Suren Baghdasaryan wrote:
quoted
quoted
Also not sure if you need to isolate the page before this writeback.Isolation may not be required but this is to avoid trying of the reclaim on the same page in some parallel path as both any way places the page in the swap. Or you want me to remove the isolation here?Maybe you could isolate them in bulk then? Seems like a waste isolating them one-by-one.
Okay. Should the bulk here be SWAP_CLUSTER_MAX fine?
quoted
quoted
Won't deleting the page from swap cache interfere with ongoing writeback if it has not yet completed?I just followed the path of how to reclaim the page: shrink_page_list() pageout() .......... __remove_mapping() __delete_from_swap_cache() You see some issue here which I can't understand.I think shrink_page_list() would not call __remove_mapping() if after pageout() PageWriteback() is still true. Maybe I'm missing some path?
I agree here. PG_writeback might have still set on the pages under background writeback thus should be excluded. I just considered the case for sync writes, eg:zram, where PG_writeback is cleared before returns. Will update the change accordingly.
-- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project