mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Harald Geyer <harald@ccbib.org>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work()
Date: Tue, 7 Mar 2017 14:16:48 -0500	[thread overview]
Message-ID: <20170307191648.GA31179@htj.duckdns.org> (raw)
In-Reply-To: <ed1aca3f6ed8386a366b8dc6386a225a@ccbib.org>

Hello,

On Tue, Mar 07, 2017 at 12:29:32PM +0100, Harald Geyer wrote:
> On 06.03.2017 23:22, Tejun Heo wrote:
> > I don't think it's a matter of "fixing" the existing
> > mod_delayed_work().  What the new function is implementing wouldn't
> > fit use cases where the timeout should only be shortened (IIRC,
> > writeback code does that).
> > 
> > I'm not against adding new interface to handle it better but I think
> > it makes more sense to add both directions.  How about adding
> > expedite_delayed_work_on() and postpone_delayed_work_on()?
> 
> I think such a function should only be added if there is actually
> code using it. So I'd wait for the survey of existing mod_delayed_work()
> users Mark has promised to actually find some bugs that would be fixed
> by the function before adding it.

I clearly remember writing code to work around that.  Unfortunately, I
can't find it right now. :( Note that these cases may use cancel,
update timeout, requeue sequence rather then mod_delayed_work().  But
yeah, we can add the other direction when we find and can convert the
users.

> The names you are proposing feel less clear to me then mod_fwd/mod_bwd,
> but english is not my native tongue, so my feeling is probably no
> strong evidence ... :)

Forward and backward aren't necessarily time related.  It can be
interpreted as relative position from now too - pulling a work item
forward or pushing it backward.  The orientation isn't explicit in the
name.

Thanks.

-- 
tejun

  reply	other threads:[~2017-03-07 19:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 17:41 Harald Geyer
2017-02-22 17:41 ` [PATCH 2/2] regulator: core: Fix race on multiple calls to regulator_disable_deferred() Harald Geyer
2017-02-22 18:21 ` [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Mark Brown
2017-02-22 20:06   ` Harald Geyer
2017-02-23 17:34     ` Mark Brown
2017-02-23 23:22       ` Harald Geyer
2017-02-27 12:54         ` Mark Brown
2017-02-27 19:17           ` Harald Geyer
2017-03-07 12:42             ` Mark Brown
2017-03-10 18:44               ` Harald Geyer
2017-03-06 22:22       ` Tejun Heo
2017-03-07 11:29         ` Harald Geyer
2017-03-07 19:16           ` Tejun Heo [this message]
2017-03-07 12:45         ` Mark Brown

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=20170307191648.GA31179@htj.duckdns.org \
    --to=tj@kernel.org \
    --cc=broonie@kernel.org \
    --cc=harald@ccbib.org \
    --cc=jiangshanlai@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome