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


Groups > linux.kernel > #1238551

Re: [RFC v2 07/18] kthread: Allow to cancel kthread work

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC v2 07/18] kthread: Allow to cancel kthread work
Date 2015-10-02 21:30 +0200
Message-ID <qfebL-4hK-3@gated-at.bofh.it> (permalink)
References (1 earlier) <qb912-7vU-59@gated-at.bofh.it> <qbBzX-6tc-7@gated-at.bofh.it> <qczmq-8ke-7@gated-at.bofh.it> <qdK65-5Gg-1@gated-at.bofh.it> <qfaKS-7Fv-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Fri, Oct 02, 2015 at 05:43:36PM +0200, Petr Mladek wrote:
> IMHO, we need both locks. The worker manipulates more works and
> need its own lock. We need work-specific lock because the work
> might be assigned to different workers and we need to be sure
> that the operations are really serialized, e.g. queuing.

I don't think we need per-work lock.  Do we have such usage in kernel
at all?  If you're worried, let the first queueing record the worker
and trigger warning if someone tries to queue it anywhere else.  This
doesn't need to be full-on general like workqueue.  Let's make
reasonable trade-offs where possible.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Tejun Heo <tj@kernel.org> - 2015-09-22 21:40 +0200
  Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Petr Mladek <pmladek@suse.com> - 2015-09-25 13:30 +0200
    Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Tejun Heo <tj@kernel.org> - 2015-09-28 19:10 +0200
      Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Petr Mladek <pmladek@suse.com> - 2015-10-02 17:50 +0200
        Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Tejun Heo <tj@kernel.org> - 2015-10-02 21:30 +0200
          Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Petr Mladek <pmladek@suse.com> - 2015-10-05 12:10 +0200
            Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Petr Mladek <pmladek@suse.com> - 2015-10-05 13:10 +0200

csiph-web