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: <CAGWkznEv+F1A878Nw0=di02DHyKxWCvK0B=93o1xjXK6nUyQ3Q@mail.gmail.com>
Date: Tue, 3 Sep 2024 16:50:46 +0800
From: Zhaoyang Huang <huangzhaoyang@...il.com>
To: "Theodore Ts'o" <tytso@....edu>
Cc: "zhaoyang.huang" <zhaoyang.huang@...soc.com>, Andreas Dilger <adilger.kernel@...ger.ca>, 
	Baolin Wang <baolin.wang@...ux.alibaba.com>, linux-fsdevel@...r.kernel.org, 
	linux-ext4@...r.kernel.org, steve.kang@...soc.com
Subject: Re: [RFC PATCHv2 1/1] fs: ext4: Don't use CMA for buffer_head

On Tue, Sep 3, 2024 at 10:29 AM Theodore Ts'o <tytso@....edu> wrote:
>
> On Fri, Aug 23, 2024 at 04:22:37PM +0800, zhaoyang.huang wrote:
> >
> > +#ifndef CONFIG_CMA
> >       bh = sb_getblk(inode->i_sb, map.m_pblk);
> > +#else
> > +     bh = sb_getblk_gfp(inode->i_sb, map.m_pblk, 0);
> > +#endif
>
> So all of these patches to try to work around your issue with CMA are
> a bit ugly.  But passing in a GFP mask of zero is definitely not the
> right way to go about thing, since there might be certain GFP masks
> that are required by a particular block device.  What I think you are
> trying to do is to avoid setting the __GFP_MOVEABLE flag.  So in that
> case, in the CMA path something like this is what you want:
>
>         bh = getblk_unmoveable(sb->s_bdev, map.m_pblk, sb->s_blocksize);
>
> I'd also sugest only trying to use this is the file system has
> journaling enabled.  If the file system is an ext2 file system without
> a journal, there's no reason avoid using the CMA region
agree.
> assume the reason why the buffer cache is trying to use the moveable
> flag is because the amount of non-CMA memory might be a precious
> resource in some systems.
I don't think so. All migrate type page blocks possess the same
position as each other as they could fallback to all migrate types
when current fails. I guess the purpose could be to enlarge the scope
of available memory as __GFP_MOVEABLE has the capability of recruiting
CMA.
>
>                                 - Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ