linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock
Date: Tue, 12 Jul 2022 14:45:40 +0300	[thread overview]
Message-ID: <a03f8feb-b235-adeb-3981-2a21205734ea@suse.com> (raw)
In-Reply-To: <cover.1657097693.git.fdmanana@suse.com>



On 6.07.22 г. 12:09 ч., fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> After the recent conversions of a couple radix trees to XArrays, we now
> can end up attempting to sleep while holding a spinlock. This happens
> because if xa_insert() allocates memory (using GFP_NOFS) it may need to
> sleep (more likely to happen when under memory pressure). In the old
> code this did not happen because we had radix_tree_preload() called
> before taking the spinlocks.
> 
> Filipe Manana (3):
>    btrfs: fix sleep while under a spinlock when allocating delayed inode
>    btrfs: fix sleep while under a spinlock when inserting a fs root
>    btrfs: free qgroup metadata without holding the fs roots lock
> 
>   fs/btrfs/ctree.h         |  6 +++---
>   fs/btrfs/delayed-inode.c | 24 ++++++++++++------------
>   fs/btrfs/disk-io.c       | 38 +++++++++++++++++++-------------------
>   fs/btrfs/inode.c         | 30 ++++++++++++++++--------------
>   fs/btrfs/relocation.c    | 11 +++++++----
>   fs/btrfs/transaction.c   | 14 +++++++-------
>   6 files changed, 64 insertions(+), 59 deletions(-)
> 


Reviewed-by: Nikolay Borisov <nborisov@suse.com>

  parent reply	other threads:[~2022-07-12 11:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  9:09 [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock fdmanana
2022-07-06  9:09 ` [PATCH 1/3] btrfs: fix sleep while under a spinlock when allocating delayed inode fdmanana
2022-07-06  9:09 ` [PATCH 2/3] btrfs: fix sleep while under a spinlock when inserting a fs root fdmanana
2022-07-06  9:09 ` [PATCH 3/3] btrfs: free qgroup metadata without holding the fs roots lock fdmanana
2022-07-07 16:31 ` [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock David Sterba
2022-07-08  0:24   ` Matthew Wilcox
2022-07-12 11:45 ` Nikolay Borisov [this message]
2022-07-13 13:59 ` Filipe Manana
2022-07-15 12:01   ` David Sterba
2022-07-15 12:47     ` Nikolay Borisov
2022-07-15 16:52       ` David Sterba

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=a03f8feb-b235-adeb-3981-2a21205734ea@suse.com \
    --to=nborisov@suse.com \
    --cc=fdmanana@kernel.org \
    --cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).