Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755840AbdCGTS0 (ORCPT ); Tue, 7 Mar 2017 14:18:26 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34832 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734AbdCGTQv (ORCPT ); Tue, 7 Mar 2017 14:16:51 -0500 Date: Tue, 7 Mar 2017 14:16:48 -0500 From: Tejun Heo To: Harald Geyer Cc: Mark Brown , Liam Girdwood , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] workqueue: Add new function mod_fwd_delayed_work() Message-ID: <20170307191648.GA31179@htj.duckdns.org> References: <1487785285-3567-1-git-send-email-harald@ccbib.org> <20170222182111.4jajk2ed52okx323@sirena.org.uk> <20170223173449.c747nrfr3oxrjrr7@sirena.org.uk> <20170306222212.GM26127@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 37 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