Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp337840pxu; Wed, 25 Nov 2020 04:40:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyb9JnnLB/Maoq1PWrTiBgJJEuMvC6TUZHuW5RM0e8w0RGJp6tHgpVHNzw1XSn1kMDwrBYG X-Received: by 2002:a05:6402:1d0b:: with SMTP id dg11mr3272686edb.55.1606308029785; Wed, 25 Nov 2020 04:40:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606308029; cv=none; d=google.com; s=arc-20160816; b=ef7vXn58Q7dfXosUHlYTEKplOqX3VLpx5L/jMpFlnpHJwr8zDDJgIzGm/1n9RCNuVX 2r2sjP54BOQMdDKqFH4/A2kapa2GcdEEd5l/geAGvRouB0brnDIumMBIUKCZBQ2VSL8U n1J+0CsEqOWB6JLcteo+nCEsbPoOPcGzUcPpSXyNKShR3bPCJpPJbPLZBXOt/fTCwZBZ WOgu6z9vFyDacR4P6yulz+nelr1XP2jvPY+4d5uFOkajjj5kWhj5jKFxlkdoORBnFeVh 2YReUPP3uaVgIu/w9mWWxkOmFXVGFNhl+RFFSEKWgTQYboMjHNc4pqFH288Qgleh7DI7 c7zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=KACiLRDVxG3h/sLMQ5dOaIvM1T2lG1rMqMZCn55vO8Y=; b=yClrLqLL3yjkUmVi30X5vPD8kiq4tP0xs63c/eANHYoiDeQkPhu/Qp4LKj541hYC51 tGCZz516MKd4Fax/H0wjJJUySWHPQpmKa8LmRt2wY6u+j2vb4qchzUMZDeWWGAimUpoa jOBn14BSh5V3xNcyL/BoQE92Zqi/f+X1EfpjRQNGDc+GwzQOgn+25JhWRHEjMbHYK9Fl rV9ALzxlelnLuDVKRFv5xRq+etoHNkJalDbdBe05yUFkpRW9MzvytOYGi6er7krB1GVq rO73m+sjWI3lfpESKajOG/qJ5YqFlyLS0z8Z5W/Swau4bPi2x0KP5CV1BagpxcAFairO 2DWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AnWJWjKE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b6si400107ejg.357.2020.11.25.04.40.05; Wed, 25 Nov 2020 04:40:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AnWJWjKE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729455AbgKYMgj (ORCPT + 99 others); Wed, 25 Nov 2020 07:36:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728135AbgKYMgi (ORCPT ); Wed, 25 Nov 2020 07:36:38 -0500 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95EF5C0613D4 for ; Wed, 25 Nov 2020 04:36:38 -0800 (PST) Received: by mail-qk1-x742.google.com with SMTP id y18so4006375qki.11 for ; Wed, 25 Nov 2020 04:36:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KACiLRDVxG3h/sLMQ5dOaIvM1T2lG1rMqMZCn55vO8Y=; b=AnWJWjKEUWg8YC83KOrcI1Z9ba7gj4AFoRn0qBjTEuxTcE1WiNCvsdHZmFilzcFHMz JyUDUHvXthXTJmdu8ZVPPblOtntilq9CZfbysnjvoq7utw8AqeZaU58fIpSd/mtFe54d k1pf9FM1j3XMIRbEJsp8unCNMH+7AVs37sh0ylcErtChJhHo1ZlrTWyIXt0u6hEwwARX srgcDWeYbPR3P6yJyT2bQ5AAtC9ZedxfF5LP8q64nfsHkHMDcwQWW+yOW4CU61/SnP1/ mkAQ9uGXdJHWX48oYC4e5MX0lt0RV87HkMvZ1uA2w3wJVdOZJ3gRObO/y0cs7d34gZv8 2D5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=KACiLRDVxG3h/sLMQ5dOaIvM1T2lG1rMqMZCn55vO8Y=; b=FFZY6WtZeitY01WZ2q4yGuXh+OsCrRfNUFEMzpMUXbycY/y249GLptcvJtdQOo258g /oOXFuoB9xVmHmU5yy1j2cXYQIiCgR8OG4zfPFkwN3HAXbOKbNyKwQLHwENjfte9sQzf PBEbpYvjJELe7nPbePs2WDtPYe6+1uI3kw6OtdixMnnsvq2clfeAvrMOBO6mPI0p6bDs ooBdT5ip5Fxfns7MnDApdX2ioo/wyO6Jpc8CBBKYTiLGHAK6AqNXxjUL9rd4JQk7SuEd pf46q0leooTV7SskSOBZttmMg5JAXFKL7Kth7YWrR4mF0VLrpenmMa7mauOSgO4kAkls qJgg== X-Gm-Message-State: AOAM5336n99L/MOX8AznlBdyGFHSo47OCrw25T2C/2k2phd5efAzjCaW wrWa9Lcnfa87mqC+4+cYRqc= X-Received: by 2002:a37:a654:: with SMTP id p81mr2978588qke.404.1606307797779; Wed, 25 Nov 2020 04:36:37 -0800 (PST) Received: from localhost (dhcp-6c-ae-f6-dc-d8-61.cpe.echoes.net. [72.28.8.195]) by smtp.gmail.com with ESMTPSA id b197sm2337308qkg.65.2020.11.25.04.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 04:36:37 -0800 (PST) Sender: Tejun Heo Date: Wed, 25 Nov 2020 07:36:14 -0500 From: "tj@kernel.org" To: NeilBrown Cc: Trond Myklebust , "jiangshanlai@gmail.com" , "mhocko@suse.com" , "peterz@infradead.org" , "juri.lelli@redhat.com" , "mingo@redhat.com" , "vincent.guittot@linaro.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH rfc] workqueue: honour cond_resched() more effectively. Message-ID: References: <87v9efp7cs.fsf@notabene.neil.brown.name> <20201109080038.GY2594@hirez.programming.kicks-ass.net> <20201109140141.GE7496@mtj.duckdns.org> <20201109161007.GF7496@mtj.duckdns.org> <87ft55nd6n.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ft55nd6n.fsf@notabene.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, Nov 20, 2020 at 10:23:44AM +1100, NeilBrown wrote: > On Mon, Nov 09 2020, tj@kernel.org wrote: > > > Given that nothing on > > these types of workqueues can be latency sensitive > > This caught my eye and it seems worth drilling in to. There is no > mention of "latency" in workqueue.rst or workqueue.h. But you seem to > be saying there is an undocumented assumption that latency-sensitive > work items much not be scheduled on CM-workqueues. > Is that correct? Yeah, correct. Because they're all sharing execution concurrency, the latency consistency is likely a lot worse. > NFS writes are latency sensitive to a degree as increased latency per > request will hurt overall throughput. Does this mean that handling > write-completion in a CM-wq is a poor choice? > Would it be better to us WQ_HIGHPRI?? Is there any rule-of-thumb that > can be used to determine when WQ_HIGHPRI is appropriate? I don't think it'd need HIGHPRI but UNBOUND or CPU_INTENSIVE would make sense. I think the rule of the thumb is along the line of if you're worried about cpu consumption or latency, let the scheduler take care of it (ie. use unbound workqueues). Thanks. -- tejun