Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1587170

Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work()

From Harald Geyer <harald@ccbib.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work()
Date 2017-02-24 00:30 +0100
Message-ID <teaZI-8es-21@gated-at.bofh.it> (permalink)
References <tdJPP-5LC-5@gated-at.bofh.it> <tdJPQ-5LC-21@gated-at.bofh.it> <tdLoC-73y-9@gated-at.bofh.it> <te5GF-4ww-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Mark Brown writes:
> > > The obvious question here, especially in the case of
> > > mod_delayed_work(), is why not fix the existing functions to have
> > > the expected behaviour?
> 
> > AFAICS the existing functions behave as documented. I don't feel
> > to be an authority to decide that the documented behaviour is not
> > right. Actually I think that what mod_delayed_work() does, is a valid
> > operation, even if many current users probably don't want it.
> 
> It is *very* non-obvious that mod_delayed_work() will have a problem
> from the documentation, there's "mod_delayed_work_on() on local CPU"
> as the body of the description but honestly I'm struggling to tell if
> that's even there intentionally or anything other than an implementation
> detail. I'd expect to see some words describing the situations where it
> can be used or something, both the name and the lack of any information
> about issues suggest it's the default thing and will work safely.

It was obvious enough for me, so that I proposed a new function
instead of just switching the regulator code from queue_delayed_work()
to mod_delayed_work(). If it's not obvious to you, I suggest that
you supply a patch improving the documentation.

> > I was suprised when I found that no function like
> > mod_fwd_delayed_work() existed, so you have a point there.
> 
> I suspect people are just using mod_delayed_work(), not realising that
> there are restrictions. I'm thinking that perhaps it should be fixed to
> be safe for calling from different contexts and a new function with the
> existing behaviour added, that seems less error prone.

As I already wrote in my last message: To go that path means to review
107 uses of mod_delayed_work(). Maybe you have somebody you can assign
that task to? 

Harald
-- 
If you want to support my work:
see http://friends.ccbib.org/harald/supporting/
or donate via CLAM to xASPBtezLNqj4cUe8MT5nZjthRSEjrRQXN
or via peercoin to P98LRdhit3gZbHDBe7ta5jtXrMJUms4p7w

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Harald Geyer <harald@ccbib.org> - 2017-02-22 19:30 +0100
  Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Mark Brown <broonie@kernel.org> - 2017-02-22 19:30 +0100
    Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Harald Geyer <harald@ccbib.org> - 2017-02-22 21:10 +0100
      Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Mark Brown <broonie@kernel.org> - 2017-02-23 18:50 +0100
        Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Harald Geyer <harald@ccbib.org> - 2017-02-24 00:30 +0100
          Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Mark Brown <broonie@kernel.org> - 2017-02-27 14:00 +0100
            Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Harald Geyer <harald@ccbib.org> - 2017-02-27 20:50 +0100

csiph-web