From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Christoph Lameter <cl@linux.com>,
Kevin Hilman <khilman@linaro.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Mike Galbraith <bitbucket@online.de>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH 5/5] workqueue: Allow modifying low level unbound workqueue cpumask
Date: Tue, 20 May 2014 22:08:30 +0200 [thread overview]
Message-ID: <20140520200828.GG17741@localhost.localdomain> (raw)
In-Reply-To: <20140520195656.GA5586@htj.dyndns.org>
On Tue, May 20, 2014 at 03:56:56PM -0400, Tejun Heo wrote:
> > > Hmmm... but there's nothing which makes rolling back more likely to
> > > succeed compared to the original applications. It's gonna allocate
> > > more pwqs. Triggering WARN_ON_ONCE() seems weird.
> >
> > Yeah but that's the least we can do. If we fail to even recover the old cpumask,
> > the user should know about the half state fail.
>
> I'm failing to see how it'd be better than just going through applying
> the new mask if we're likely to end up with half-updated states
> anyway. What's the point of another layer of best effort logic which
> is more likely to fail?
If the error is -ENOMEM then yeah, but any other error wants rollback.
> > But it's going to imply fun with double linked list of struct pwq_allocation_object
> > and stuff. Or maybe an array. This reminds be a bit generate_sched_domains(). It's
> > not going to be _that_ simple nor pretty :)
>
> Is it tho? Don't we just need to keep a separate staging copy of
> prepared pwq_tbl? The commit stage can be pwq_tbl installation.
> Looks like it shouldn't be too much of problem. Am I missing
> something?
Sure, that still need an iteration array/list of pre-allocated objects.
Expect at least one more hundred lines.
>
> > > 2. Proper error handling is hard. Just do pr_warn() on each failure
> > > and continue to try to apply and always return 0.
> > >
> > > If #1 isn't too complicated (would it be?), it'd be the better option;
> > > otherwise, well, #2 should work most of the time, eh?
> >
> > Yeah I think #2 should be way enough 99% of the time :)
>
> Yeah, if #1 gets too hairy, #2 can be a reluctant option but if #1 is
> doable without too much complication, I'd much prefer proper error
> handling.
I can try yeah.
next prev parent reply other threads:[~2014-05-20 20:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 16:16 [RFC PATCH 0/5] workqueue: Introduce low-level unbound wq sysfs cpumask v3 Frederic Weisbecker
2014-05-16 16:16 ` [PATCH 1/5] workqueue: Allow changing attributions of ordered workqueues Frederic Weisbecker
2014-05-16 20:12 ` Tejun Heo
2014-05-17 13:41 ` Frederic Weisbecker
2014-05-19 20:15 ` Tejun Heo
2014-05-20 14:32 ` Frederic Weisbecker
2014-05-20 14:35 ` Tejun Heo
2014-05-20 15:08 ` Frederic Weisbecker
2014-05-21 7:29 ` Lai Jiangshan
2014-05-21 19:18 ` Tejun Heo
2014-05-16 16:16 ` [PATCH 2/5] workqueue: Reorder sysfs code Frederic Weisbecker
2014-05-16 16:16 ` [PATCH 3/5] workqueue: Create low-level unbound workqueues cpumask Frederic Weisbecker
2014-05-16 17:52 ` Christoph Lameter
2014-05-16 18:35 ` Tejun Heo
2014-05-16 18:52 ` Christoph Lameter
2014-05-16 19:00 ` Tejun Heo
2014-05-16 19:22 ` Tejun Heo
2014-05-16 19:32 ` Christoph Lameter
2014-05-16 19:34 ` Tejun Heo
2014-05-16 19:45 ` Tejun Heo
2014-05-16 23:02 ` Christoph Lameter
2014-05-16 23:48 ` Tejun Heo
2014-05-17 22:45 ` Christoph Lameter
2014-05-18 2:51 ` Tejun Heo
2014-05-16 16:16 ` [PATCH 4/5] workqueue: Split apply attrs code from its locking Frederic Weisbecker
2014-05-16 16:16 ` [PATCH 5/5] workqueue: Allow modifying low level unbound workqueue cpumask Frederic Weisbecker
2014-05-16 20:50 ` Tejun Heo
2014-05-20 19:32 ` Frederic Weisbecker
2014-05-20 19:56 ` Tejun Heo
2014-05-20 20:08 ` Frederic Weisbecker [this message]
2014-07-11 8:41 ` [RFC PATCH 0/5] workqueue: Introduce low-level unbound wq sysfs cpumask v3 Lai Jiangshan
2014-07-11 13:11 ` Frederic Weisbecker
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=20140520200828.GG17741@localhost.localdomain \
--to=fweisbec@gmail.com \
--cc=bitbucket@online.de \
--cc=cl@linux.com \
--cc=khilman@linaro.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tj@kernel.org \
--cc=viresh.kumar@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.