All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: axboe@kernel.dk, bigeasy@linutronix.de, tglx@linutronix.de,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH] blk-mq: make synchronous hw_queue runs RT friendly
Date: Mon, 13 Dec 2021 05:07:04 -0800	[thread overview]
Message-ID: <YbdFeHVnQbT0E5kR@infradead.org> (raw)
In-Reply-To: <20211213054425.28121-1-dave@stgolabs.net>

> +#ifndef CONFIG_PREEMPT_RT

Please don't add these silly inverted ifdefs.

> +static inline void blk_mq_start_sync_run_hw_queue(void)
> +{
> +	preempt_disable();
> +}
> +static inline void blk_mq_end_sync_run_hw_queue(void)
> +{
> +	preempt_enable();
> +}
> +#else
> +static inline void blk_mq_start_sync_run_hw_queue(void)
> +{
> +	migrate_disable();
> +}
> +static inline void blk_mq_end_sync_run_hw_queue(void)
> +{
> +	migrate_enable();
> +}
> +#endif

But more importantly:  why isn't migrate_disable/enable doing the right
thing for !PREEMPT_RT to avoid this mess?

  reply	other threads:[~2021-12-13 13:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13  5:44 [PATCH] blk-mq: make synchronous hw_queue runs RT friendly Davidlohr Bueso
2021-12-13 13:07 ` Christoph Hellwig [this message]
2021-12-13 13:52   ` Sebastian Andrzej Siewior
2021-12-13 19:05   ` Davidlohr Bueso
2021-12-14  8:08     ` Christoph Hellwig

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=YbdFeHVnQbT0E5kR@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.