public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Peter Lafreniere <peter@n8pjl.ca>
Cc: linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Barry Song <baohua@kernel.org>, Ben Segall <bsegall@google.com>,
	haniel Bristot de Oliveira <bristot@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Gal Pressman <gal@nvidia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heiko Carstens <hca@linux.ibm.com>,
	Ingo Molnar <mingo@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Leon Romanovsky <leonro@nvidia.com>, Mel Gorman <mgorman@suse.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Tariq Toukan <tariqt@nvidia.com>,
	Tariq Toukan <ttoukan.linux@gmail.com>,
	Tony Luck <tony.luck@intel.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-crypto@vger.kernel.org, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3 5/5] lib/cpumask: reorganize cpumask_local_spread() logic
Date: Thu, 8 Dec 2022 12:41:33 -0800	[thread overview]
Message-ID: <Y5JL/YqlxoC/4j4A@yury-laptop> (raw)
In-Reply-To: <KQCC2QYXZ6BtFjiUQO-XQNUO5Ub3kGfpKzjfIeUfCQEvMUEMKiZ7ofEMqoZElMYxYFtuRqW6v3UzCpDzDR-QYZk-tpMDVLl_HSl8BEi1hZk=@n8pjl.ca>

On Thu, Dec 08, 2022 at 08:17:22PM +0000, Peter Lafreniere wrote:
> > Now after moving all NUMA logic into sched_numa_find_nth_cpu(),
> > else-branch of cpumask_local_spread() is just a function call, and
> > we can simplify logic by using ternary operator.
> >
> > While here, replace BUG() with WARN().
> Why make this change? It's still as bad to hit the WARN_ON as it was before.

For example, because of this:

  > Greg, please don't do this
  > 
  > > ChangeSet@1.614, 2002-09-05 08:33:20-07:00, greg@kroah.com
  > >   USB: storage driver: replace show_trace() with BUG()
  > 
  > that BUG() thing is _way_ out of line, and has killed a few of my machines
  > several times for no good reason. It actively hurts debuggability, because
  > the machine is totally dead after it, and the whole and ONLY point of
  > BUG() messages is to help debugging and make it clear that we can't handle
  > something.
  > 
  > In this case, we _can_ handle it, and we're much better off with a machine
  > that works and that you can look up the messages with than killing it.
  > 
  > Rule of thumb: BUG() is only good for something that never happens and
  > that we really have no other option for (ie state is so corrupt that
  > continuing is deadly).
  > 
  > 		Linus

  reply	other threads:[~2022-12-08 20:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 18:30 [PATCH v3 0/5] cpumask: improve on cpumask_local_spread() locality Yury Norov
2022-12-08 18:30 ` [PATCH v3 1/5] lib/find: introduce find_nth_and_andnot_bit Yury Norov
2022-12-08 18:30 ` [PATCH v3 2/5] cpumask: introduce cpumask_nth_and_andnot Yury Norov
2022-12-08 18:30 ` [PATCH v3 3/5] sched: add sched_numa_find_nth_cpu() Yury Norov
2022-12-08 18:31 ` [PATCH v3 4/5] cpumask: improve on cpumask_local_spread() locality Yury Norov
2022-12-08 18:31 ` [PATCH v3 5/5] lib/cpumask: reorganize cpumask_local_spread() logic Yury Norov
2022-12-08 20:17   ` Peter Lafreniere
2022-12-08 20:41     ` Yury Norov [this message]
2022-12-08 20:57       ` Peter Lafreniere
2022-12-08 18:45 ` [PATCH v3 0/5] cpumask: improve on cpumask_local_spread() locality Jacob Keller
2022-12-08 20:22 ` Tariq Toukan
2022-12-08 20:51   ` Yury Norov

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=Y5JL/YqlxoC/4j4A@yury-laptop \
    --to=yury.norov@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=baohua@kernel.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=davem@davemloft.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=gal@nvidia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgg@nvidia.com \
    --cc=juri.lelli@redhat.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter@n8pjl.ca \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=tony.luck@intel.com \
    --cc=ttoukan.linux@gmail.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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