Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1092046ybv; Thu, 13 Feb 2020 15:43:20 -0800 (PST) X-Google-Smtp-Source: APXvYqw68cy8n9K/Nw1x1wnQnAcRtdBNLurS2353N4CQ83cAnKrfsGjehgf7sAK/VZbhGQzeHPXL X-Received: by 2002:a9d:170a:: with SMTP id i10mr29061ota.284.1581637400750; Thu, 13 Feb 2020 15:43:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581637400; cv=none; d=google.com; s=arc-20160816; b=YbqUnc6et+sbFsL0uEKmTnJvYnuT252Z4FrpTuZQ+ZXAOXTGWrYBKqqMNLjALyMusH oxzhXt+fF0Q982fKUhoMea+DHkQGAY9s+P6CYeWYi/fATVhBHoaI/vELKuQS7GAfmb+P Azva2q1liMIdYhmLnIpv7vT3asu2dhlpgZiyzC4AbqgL3DqOzCe9dah2aM/8JPJuYPrZ fnCeVQu1oGSPMlzpsp0seZWX8FBGdOdpOkgRj2s5EfTL5lLzLHeCvQyqqdF4w4gYKRc6 tkejYZ6dfA7b0xjIhfgr7/t3P/sP1glvhMyuK19J84YbPF5rhyqpT3zEvzfp+uYmXoCT h4lg== 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=ebt3A4BXWY6AfTmhpZiXErWVJax+s3cbfpU3oF1RwYk=; b=EHQRTiysRjs0rX22R1tEHZ2S9MxJUrQ/P4Kgqe6/d0Pfz6d0sC1Bd1mB2bISluBl+6 OMOH0fbO1W5f9uQH8PM20ug/ZjON8Tq5koyjRh0dXGbgrMuWyhQ3B6mVdP877K417d6X psaq9xS8HoSsLUznh+TwgvDnbshhoVbHlemclg1rTCb2evr2yYxUmAs7aWZO7cvpYlFs /aaKOeQNX9H78eW+GCe060eo2jrrpYul8Nyo6M5YPKm0kxuE1S5InSX0hPhsGg2R4sgk r3LXY1GnItoFEVTLOMNiP811GhdBwcZ1vVoQxR1qCm+jJXC+jrfN1pgQDqgreVgj7cVF jT8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cPo6gRm2; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si1778531oij.29.2020.02.13.15.43.07; Thu, 13 Feb 2020 15:43:20 -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=@kernel.org header.s=default header.b=cPo6gRm2; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727782AbgBMXm7 (ORCPT + 99 others); Thu, 13 Feb 2020 18:42:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:50548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727594AbgBMXm7 (ORCPT ); Thu, 13 Feb 2020 18:42:59 -0500 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89F6D2467D; Thu, 13 Feb 2020 23:42:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581637378; bh=QvXr0ccIUZIRsqUcy6mdX4RvItZ/HQGPAVqIR5RAVyo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cPo6gRm2riJCg2de4KFKjGUPyih5I99+ID98XQlsTTxOWt9KQ5Pfqdzsd5F8lPb46 PWQzSbOz7vIG+xvGz7PfCbmDfooxlwTbJpl1r0D3JFRAOkqSLvkxfK8/0KLnmSKU0Y 1H66ieYG9DmRRXq2PvYmmF1St6fRqy/EY5GTTf3U= Received: by mail-lj1-f182.google.com with SMTP id v17so8650836ljg.4; Thu, 13 Feb 2020 15:42:58 -0800 (PST) X-Gm-Message-State: APjAAAUb1CfRx2QXhgS6f3LnmqO1jgROFnwsemZxbhjIQIyd3pwJn9VF m+rbhCifUv5Zkw30EnyNy1zzXRKHtCfuRH3rsRU= X-Received: by 2002:a2e:a553:: with SMTP id e19mr168246ljn.64.1581637376641; Thu, 13 Feb 2020 15:42:56 -0800 (PST) MIME-Version: 1.0 References: <20200213141823.2174236-1-mplaneta@os.inf.tu-dresden.de> <20200213153645.GA11313@redhat.com> <82715589-8b59-5cfd-a32f-1e57871327fe@os.inf.tu-dresden.de> In-Reply-To: <82715589-8b59-5cfd-a32f-1e57871327fe@os.inf.tu-dresden.de> From: Song Liu Date: Thu, 13 Feb 2020 15:42:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Remove WQ_CPU_INTENSIVE flag from unbound wq's To: Maksym Planeta Cc: Mike Snitzer , Zhou Wang , Herbert Xu , "David S. Miller" , Alasdair Kergon , dm-devel@redhat.com, Gao Xiang , Chao Yu , linux-crypto@vger.kernel.org, open list , linux-raid , linux-erofs@lists.ozlabs.org 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 On Thu, Feb 13, 2020 at 8:19 AM Maksym Planeta wrote: > > > > On 13/02/2020 16:36, Mike Snitzer wrote: > > On Thu, Feb 13 2020 at 9:18am -0500, > > Maksym Planeta wrote: > > > >> The documentation [1] says that WQ_CPU_INTENSIVE is "meaningless" for > >> unbound wq. I remove this flag from places where unbound queue is > >> allocated. This is supposed to improve code readability. > >> > >> 1. https://www.kernel.org/doc/html/latest/core-api/workqueue.html#flags > >> > >> Signed-off-by: Maksym Planeta > > > > What the Documentation says aside, have you cross referenced with the > > code? And/or have you done benchmarks to verify no changes? > > > > It seems so from the code. Although, I'm not 100% confident. I did not > run benchmarks, instead I relied that on the assumption that > documentation is correct. From the code, WQ_CPU_INTENSIVE is only used to set WORKER_CPU_INTENSIVE, and WORKER_CPU_INTENSIVE is only used as part of WORKER_NOT_RUNNING, which includes WORKER_UNBOUND. So, I agree that with current code, WQ_CPU_INTENSIVE with WQ_UNBOUND is same as WQ_UNBOUND alone. However, I don't think it is necessary to make the changes. They don't really improve readability of the code. Thanks, Song