From: Dave Chinner <david@fromorbit.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: Modify xlog_ticket_alloc() to use kernel's MM API
Date: Thu, 9 Jul 2020 13:00:04 +1000 [thread overview]
Message-ID: <20200709030004.GU2005@dread.disaster.area> (raw)
In-Reply-To: <20200708125608.155645-4-cmaiolino@redhat.com>
On Wed, Jul 08, 2020 at 02:56:07PM +0200, Carlos Maiolino wrote:
> change xlog_ticket_alloc() to use default kmem_cache_zalloc(), and
> modify its callers to pass MM flags as arguments.
>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
> fs/xfs/xfs_log.c | 7 ++++---
> fs/xfs/xfs_log_cil.c | 2 +-
> fs/xfs/xfs_log_priv.h | 2 +-
> 3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index 00fda2e8e7380..6d40d479e34a1 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -433,7 +433,8 @@ xfs_log_reserve(
> XFS_STATS_INC(mp, xs_try_logspace);
>
> ASSERT(*ticp == NULL);
> - tic = xlog_ticket_alloc(log, unit_bytes, cnt, client, permanent, 0);
> + tic = xlog_ticket_alloc(log, unit_bytes, cnt, client, permanent,
> + (GFP_KERNEL | __GFP_NOFAIL));
> *ticp = tic;
xfs_log_reserve() is called either from transaction reservation
which is under memalloc_nofs context, or from the CIL with explicit
GFP_NOFS, or from the unmount path which is GFP_KERNEL but is
holding various filesystem locks.
I suspect that this patch should just remove the gfp flags from
xlog_ticket_alloc() and just unconditionally use GFP_NOFS |
__GFP_NOFAIL fo allocating the ticket. That would clean this up
quite a bit....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2020-07-09 3:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 12:56 [PATCH 0/4] Continue xfs kmem cleanup Carlos Maiolino
2020-07-08 12:56 ` [PATCH 1/4] xfs: Remove kmem_zone_alloc() usage Carlos Maiolino
2020-07-09 2:45 ` Dave Chinner
2020-07-08 12:56 ` [PATCH 2/4] xfs: Remove kmem_zone_zalloc() usage Carlos Maiolino
2020-07-09 2:55 ` Dave Chinner
2020-07-09 8:55 ` Carlos Maiolino
2020-07-09 16:42 ` Darrick J. Wong
2020-07-09 21:52 ` Dave Chinner
2020-07-08 12:56 ` [PATCH 3/4] xfs: Modify xlog_ticket_alloc() to use kernel's MM API Carlos Maiolino
2020-07-09 3:00 ` Dave Chinner [this message]
2020-07-08 12:56 ` [PATCH 4/4] xfs: remove xfs_zone_{alloc,zalloc} helpers Carlos Maiolino
2020-07-09 3:00 ` Dave Chinner
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=20200709030004.GU2005@dread.disaster.area \
--to=david@fromorbit.com \
--cc=cmaiolino@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/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.