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: <ZaqZPxDUOuxRWB5l@tiehlicka>
Date: Fri, 19 Jan 2024 16:46:07 +0100
From: Michal Hocko <mhocko@...e.com>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, ryan.roberts@....com,
	Matthew Wilcox <willy@...radead.org>,
	David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v2] mm: memory: move mem_cgroup_charge() into
 alloc_anon_folio()

On Fri 19-01-24 20:59:22, Kefeng Wang wrote:
> > > > GFP_TRANSHUGE_LIGHT is more interesting though because those do not dive
> > > > into the direct reclaim at all. With the current code they will reclaim
> > > > charges to free up the space for the allocated THP page and that defeats
> > > > the light mode. I have a vague recollection of preparing a patch to
> > > 
> > > We are interesting to GFP_TRANSHUGE_LIGHT and _GFP_NORETRY as mentioned
> > > above.
> > 
> > if mTHP can be smaller than COSTLY_ORDER then you are correct and
> > NORETRY makes a difference. Please mention that in the changelog as
> > well.
> > 
> 
> For memory cgroup charge, _GFP_NORETRY checked to make us directly skip
> mem_cgroup_oom(), it has no concern with folio order or COSTLY_ORDER when
> check _GFP_NORETRY in try_charge_memcg(), so I think NORETRY should
> always make difference for all large order folio.

we do not OOM on COSTLY_ORDER (see mem_cgroup_oom). So NORETRY really
makes a difference for small orders.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ