All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Paolo Valente <paolo.valente@linaro.org>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 6/7] block: cleanup ioc_clear_queue
Date: Wed, 1 Dec 2021 08:27:02 +0100	[thread overview]
Message-ID: <20211201072702.GB31765@lst.de> (raw)
In-Reply-To: <20211130172613.GL7174@quack2.suse.cz>

On Tue, Nov 30, 2021 at 06:26:13PM +0100, Jan Kara wrote:
> I'm not quite sure about dropping the rcu protection here. This function
> generally runs without any protection so what guards us against icq being
> freed just after we've got its pointer from the list?

How does the RCU protection scheme work for the icq lookups?
ioc_lookup_icq takes it and then drops it before getting any kind
of refcount, so this all looks weird.  But I guess you are right that
I should probably keep this cargo culted scheme unless I have an
actual plan on how this could work.

While we're at it:  I don't see how put put_io_context could
be called under q->queue_lock and thus actually need the whole
workqueue scheme.  Then again we really need to do an audit on
queue_lock and split it into actually documented locks now that the
old request code is gone.

  reply	other threads:[~2021-12-01  7:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 12:46 more I/O context cleanup Christoph Hellwig
2021-11-30 12:46 ` [PATCH 1/7] block: remove the nr_task field from struct io_context Christoph Hellwig
2021-11-30 15:43   ` Jan Kara
2021-11-30 12:46 ` [PATCH 2/7] block: simplify struct io_context refcounting Christoph Hellwig
2021-11-30 15:02   ` Jan Kara
2021-11-30 12:46 ` [PATCH 3/7] block: refactor put_iocontext_active Christoph Hellwig
2021-11-30 15:01   ` Jan Kara
2021-11-30 12:46 ` [PATCH 4/7] block: remove the NULL ioc check in put_io_context Christoph Hellwig
2021-11-30 14:59   ` Jan Kara
2021-11-30 12:46 ` [PATCH 5/7] block: refactor put_io_context Christoph Hellwig
2021-11-30 14:58   ` Jan Kara
2021-11-30 12:46 ` [PATCH 6/7] block: cleanup ioc_clear_queue Christoph Hellwig
2021-11-30 17:26   ` Jan Kara
2021-12-01  7:27     ` Christoph Hellwig [this message]
2021-12-01 14:33       ` Jan Kara
2021-11-30 12:46 ` [PATCH 7/7] block: only build the icq tracking code when needed Christoph Hellwig
2021-11-30 17:27   ` Jan Kara
2021-12-05 13:04   ` [block] 8216260d3a: BUG:sleeping_function_called_from_invalid_context_at_arch/x86/mm/fault.c kernel test robot
2021-12-05 13:04     ` kernel test robot

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=20211201072702.GB31765@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=paolo.valente@linaro.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.