All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Yafang Shao <laoar.shao@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
	david@fromorbit.com, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, Kent Overstreet <kent.overstreet@linux.dev>
Subject: Re: [PATCH] mm: document risk of PF_MEMALLOC_NORECLAIM
Date: Wed, 21 Aug 2024 14:37:33 +0200	[thread overview]
Message-ID: <ZsXfjQTEel3GyjJc@tiehlicka> (raw)
In-Reply-To: <ZsXTA_dOKxmLcOev@infradead.org>

On Wed 21-08-24 04:44:03, Christoph Hellwig wrote:
> On Fri, Aug 16, 2024 at 10:54:37AM +0200, Michal Hocko wrote:
> > Yes, I think we should kill it before it spreads even more but I would
> > not like to make the existing user just broken. I have zero visibility
> > and understanding of the bcachefs code but from a quick look at __bch2_new_inode
> > it shouldn't be really terribly hard to push GFP_NOWAIT flag there
> > directly. >
> 
> I don't understand that sentence.  You're adding the gfp_t argument to
> it, which to mean counts as pushing it there directly.

Sorry, what I meant to say is that pushing GFP_NOWAIT directly seem fine
unless I have missed some hidden corners down the call path which would
require a scope flag to override a hardcoded gfp flag.
 
> > It would require inode_init_always_gfp variant as well (to not
> > touch all existing callers that do not have any locking requirements but
> > I do not see any other nested allocations.
> 
> inode_init_always only has 4 callers, so I'd just add the gfp_t
> argument.  Otherwise this looks good modulo the fix your posted:
> 
> Acked-by: Christoph Hellwig <hch@lst.de>

Thanks. I will wait for more review and post this as a real patch. I
would really appreciate any help with actual testing.

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2024-08-21 12:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12  9:05 [PATCH 0/2] mm: Add readahead support for IOCB_NOWAIT Yafang Shao
2024-08-12  9:05 ` [PATCH 1/2] mm: Add memalloc_nowait_{save,restore} Yafang Shao
2024-08-12 11:37   ` Christoph Hellwig
2024-08-12 12:59     ` Yafang Shao
2024-08-12 13:21       ` Christoph Hellwig
2024-08-13  2:09         ` Yafang Shao
2024-08-14  5:27           ` Christoph Hellwig
2024-08-14  7:33             ` Yafang Shao
2024-09-01 20:24               ` Vlastimil Babka
2024-09-01 20:42                 ` Kent Overstreet
2024-08-14  7:42       ` Michal Hocko
2024-08-14  8:12         ` Yafang Shao
2024-08-14 12:43           ` Michal Hocko
2024-08-15  3:26             ` Yafang Shao
2024-08-15  6:22               ` Michal Hocko
2024-08-15  6:32                 ` Yafang Shao
2024-08-15  6:51                   ` Michal Hocko
2024-08-16  8:17                     ` [PATCH] mm: document risk of PF_MEMALLOC_NORECLAIM Michal Hocko
2024-08-16  8:22                       ` Christoph Hellwig
2024-08-16  8:54                         ` Michal Hocko
2024-08-16 14:26                           ` Christoph Hellwig
2024-08-16 15:57                             ` Michal Hocko
2024-08-21  7:30                           ` Michal Hocko
2024-08-21 11:44                           ` Christoph Hellwig
2024-08-21 12:37                             ` Michal Hocko [this message]
2024-08-22  9:09                               ` Christian Brauner
2024-08-17  2:29                       ` Yafang Shao
2024-08-19  7:57                         ` Michal Hocko
2024-08-12 16:48     ` [PATCH 1/2] mm: Add memalloc_nowait_{save,restore} Kent Overstreet
2024-08-14  5:24       ` Christoph Hellwig
2024-08-14  0:28   ` Dave Chinner
2024-08-14  2:19     ` Yafang Shao
2024-08-14  5:42       ` Dave Chinner
2024-08-14  7:32         ` Yafang Shao
2024-08-15  2:54           ` Dave Chinner
2024-08-15  3:38             ` Yafang Shao
2024-08-12  9:05 ` [PATCH 2/2] mm: allow read-ahead with IOCB_NOWAIT set Yafang Shao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZsXfjQTEel3GyjJc@tiehlicka \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=kent.overstreet@linux.dev \
    --cc=laoar.shao@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.