Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1972712imj; Fri, 8 Feb 2019 10:16:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IYNgYQbSRYLJWwLcIswIMyLBlAsyqO5gS0t1mQxlIjl5vdaVWI1FS5+8nkBPXoPbqG3ATgI X-Received: by 2002:a17:902:7791:: with SMTP id o17mr23871195pll.60.1549649765468; Fri, 08 Feb 2019 10:16:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549649765; cv=none; d=google.com; s=arc-20160816; b=GaixosYpt0CbMFncPAK8cl+3fbwgRoicJfdtYXQyJhHqrX5dD1SiROdV3bxQ6+IKjD A9RINK8mf3/3bfelew2TFM7mqZG2lI9OA6zF3ZMdnZ1bYzE8UYvO3WspwirbY9ZUPzFH rjYPsbB/tX13uRrcZZ5Y+Y3wUzhH4nJsb9wJ9c0zFVeUfdN9+FCCOMu2DBA3i0yJGdPB c1vL4gl5+Io/sTq+ryDMcGXFmIx2QH54SfEaC+7bQ449t/sqsJfi3sms4iIMK4mai1MO iNJ+OW/wERyKGc7oM46+4pGfR9gYJV+XQ8tA8AgsrZaGREpk46frUDI86aDleCdBuD8E 19aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1fC1RvnwFrYgz6BCjd2ndzz+PsaKqX+zYFD4OnGitx8=; b=yU6L6V2f0TN57Dj8Xwvbm5uBq/w4nVyOdUhjzsh4Xbw0f78GRTmAnYe0txknfz5ALJ nZDRLR30/pl6kKrlsQzjjumr3aWcZ5hrPm24eKYAmntX74fWxf/yOQP37AoybNVhfzVc novSLGOiIzh0KVKXNSzK7reKk5P+rh0b9DZGtlgRKv4Dbk1pk5tMkRbdJ3ocaXJV4U80 oKva947KJgNpCLVChVB5YuWfr0lVHoj5Afsespz+66tDtL9wL7m7i/MvVB6FQ0FklUy9 g9XPLtw8moKW1ZJHwf3H5+nuInr9CHLsA3TqcCJ/89UQa58zYhVK9A3Bj9ak6qYIRt9Q omZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RKs3hDcc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si2593143pgv.252.2019.02.08.10.15.48; Fri, 08 Feb 2019 10:16:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RKs3hDcc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727870AbfBHSPc (ORCPT + 99 others); Fri, 8 Feb 2019 13:15:32 -0500 Received: from mail-ot1-f49.google.com ([209.85.210.49]:38595 "EHLO mail-ot1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727121AbfBHSPc (ORCPT ); Fri, 8 Feb 2019 13:15:32 -0500 Received: by mail-ot1-f49.google.com with SMTP id e12so7360192otl.5 for ; Fri, 08 Feb 2019 10:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1fC1RvnwFrYgz6BCjd2ndzz+PsaKqX+zYFD4OnGitx8=; b=RKs3hDccshU9rxJ1dhh1rmEhFOZnI/yvDlvfA5O6Xi1hzA8zs4oYuZUu5P6uUSsnx6 /4/MvViu1Lt+q30WoR9FjS36nrNZiZpiHpAuFfqsffxIy8sO5c31QYgD10EGQH2JeQKw Q2GFziY4CQBVIFpVaWwD8tIZ6G2hpe3jzT5YEKGS9xjLnWeMWg18fgdOMGRAzzF5Zvgg nsbYtgJjaQnPf+1VG3PM675zVbdH3pIXgc+t8yIsEpmtAbC0D1ZAMu2NCAlPKD3xKRB6 csO8VpNOsxDNVBIbNI3RxloqStsv2NSsIVyWXfsFJ+iaE/tq5JcuG4Trm5vRlMaftG+6 NnCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1fC1RvnwFrYgz6BCjd2ndzz+PsaKqX+zYFD4OnGitx8=; b=QOgYS/9fCZR6YQmtsfLaBd554PuqXZ0BOEcs9yfaxTmdgJW6tURq/x1/NnQnmwwt8C 3vLjR0SnobalehvC0l5QjmeieAMIQCqQCcGfKIXhzlBSX2drpGK060h6S2vMa2fOTn3a ku3cwmIV2pRuisrzGxX0PJZy18IVoGoIkv8bTZpw5y38AaXgoNAJ5PC+JnCbO3+Z5HgR WpUx68Nuta5rZbkz0OI5x1cLVeJrBF3ySP/K7ePpUiASRbCC91Btv5gW+/M5szPKOkXt Yo/BhhVbBbO0kUhetnwxhKwuw8dGmGOSsDC8COAIbw5yeR6vqYEpmTiRfbefbxBMnHzc 3YmA== X-Gm-Message-State: AHQUAuZ2eJ8FbjADipwF/MphkIsGNqYI/PlU4qaMdQV44faV0kosP0Gu 5dGokQRANidoeKFFpWCnn3EO0qseff3Jqo2n/lA= X-Received: by 2002:a9d:4504:: with SMTP id w4mr716223ote.18.1549649731313; Fri, 08 Feb 2019 10:15:31 -0800 (PST) MIME-Version: 1.0 References: <20190204220952.30761-1-TheSven73@googlemail.com> <20190204220952.30761-2-TheSven73@googlemail.com> <20190208170656.GL50184@devbig004.ftw2.facebook.com> In-Reply-To: <20190208170656.GL50184@devbig004.ftw2.facebook.com> From: Sven Van Asbroeck Date: Fri, 8 Feb 2019 13:15:20 -0500 Message-ID: Subject: Re: [RFC v1 1/3] workqueue: Add resource-managed version of INIT_[DELAYED_]WORK() To: Tejun Heo Cc: Lai Jiangshan , Linux Kernel Mailing List , Sebastian Reichel , Dmitry Torokhov , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tejun, On Fri, Feb 8, 2019 at 12:07 PM Tejun Heo wrote: > > I don't object to the basic idea but cancel_[delayed_]work_sync() > works iff queueing is disabled already, so there can be situations > where this can lead to surprising / subtle failures. Given that, it > *might* not be a bad idea to keep this explicit unless there is a way > to reliably block future queueing. > Yes, I'm "coming around" to your opinion myself. There's also the question of which one is appropriate for clean-up: cancel_work_sync() or flush_work(). And what about work scheduled on more than one workqueue? Or work scheduled on multi-threaded workqueues? The workqueue API sounds too complicated to have a devm_ helper. It would lull developers into a false sense of security.