lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878r6q9sx7.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date:   Wed, 22 Nov 2023 14:57:24 +0800
From:   "Huang, Ying" <ying.huang@...el.com>
To:     Yosry Ahmed <yosryahmed@...gle.com>
Cc:     Liu Shixin <liushixin2@...wei.com>, Michal Hocko <mhocko@...e.com>,
        Yu Zhao <yuzhao@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sachin Sant <sachinp@...ux.ibm.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Kefeng Wang <wangkefeng.wang@...wei.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10] mm: vmscan: try to reclaim swapcache pages if no
 swap space

Yosry Ahmed <yosryahmed@...gle.com> writes:

> On Tue, Nov 21, 2023 at 10:41 PM Liu Shixin <liushixin2@...wei.com> wrote:
>>
>>
>> On 2023/11/21 21:00, Michal Hocko wrote:
>> > On Tue 21-11-23 17:06:24, Liu Shixin wrote:
>> >
>> > However, in swapcache_only mode, the scan count still increased when scan
>> > non-swapcache pages because there are large number of non-swapcache pages
>> > and rare swapcache pages in swapcache_only mode, and if the non-swapcache
>> > is skipped and do not count, the scan of pages in isolate_lru_folios() can
>> > eventually lead to hung task, just as Sachin reported [2].
>> > I find this paragraph really confusing! I guess what you meant to say is
>> > that a real swapcache_only is problematic because it can end up not
>> > making any progress, correct?
>> This paragraph is going to explain why checking swapcache_only after scan += nr_pages;
>> >
>> > AFAIU you have addressed that problem by making swapcache_only anon LRU
>> > specific, right? That would be certainly more robust as you can still
>> > reclaim from file LRUs. I cannot say I like that because swapcache_only
>> > is a bit confusing and I do not think we want to grow more special
>> > purpose reclaim types. Would it be possible/reasonable to instead put
>> > swapcache pages on the file LRU instead?
>> It looks like a good idea, but I'm not sure if it's possible. I can try it, is there anything to
>> pay attention to?
>
> I think this might be more intrusive than we think. Every time a page
> is added to or removed from the swap cache, we will need to move it
> between LRUs. All pages on the anon LRU will need to go through the
> file LRU before being reclaimed. I think this might be too big of a
> change to achieve this patch's goal.

We need to identify swap cache pages on file LRU firstly.  It appears
hard from the current definition of page flags.

  /* Filesystems */
  PG_checked = PG_owner_priv_1,

  /* SwapBacked */
  PG_swapcache = PG_owner_priv_1,       /* Swap page: swp_entry_t in private */

--
Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ