mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: ritu pal <ritupal888@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>,
	NeilBrown <neil@brown.name>, Chen Ni <nichen@iscas.ac.cn>
Subject: Re: ipc/mqueue: release spinlock before freeing node_cache in mqueue_evict_inode()
Date: Fri, 27 Jun 2025 17:37:58 +0100	[thread overview]
Message-ID: <20250627163758.GV1880847@ZenIV> (raw)
In-Reply-To: <CAEy91+YpzU5tKEfsjt1_Hh0fsiCfVVK099EztXOPFGHFYyA1KQ@mail.gmail.com>

On Fri, Jun 27, 2025 at 06:11:14PM +0530, ritu pal wrote:
> Hi,
> 
> Currently, mqueue_evict_inode() holds info->lock while freeing
> info->node_cache
> with kfree(). Although kfree() does not sleep, it may take a non-trivial
> amount
> of time, increasing the duration the spinlock is held and potentially
> impacting
> concurrency.

That spinlock is inside the inode in question; what exactly is going to be
on the other side of contention?  Note that none of the file methods
are going to run concurrent with that...

       reply	other threads:[~2025-06-27 16:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAEy91+YpzU5tKEfsjt1_Hh0fsiCfVVK099EztXOPFGHFYyA1KQ@mail.gmail.com>
2025-06-27 16:37 ` Al Viro [this message]
2025-07-03  8:04   ` ritu pal
2025-07-03  8:10     ` Al Viro
2025-06-27 12:46 ritu pal

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=20250627163758.GV1880847@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=nichen@iscas.ac.cn \
    --cc=ritupal888@gmail.com \
    /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

all inboxes | Powered by JetHome®