Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7069621imu; Mon, 21 Jan 2019 23:11:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN46d4WJC26K+4eoJ399Ap4wiftTe6kqgHeoVHN+2DerhxZW2jm0url5PmP/zQJbQfQ/UQlz X-Received: by 2002:a17:902:9a9:: with SMTP id 38mr32609707pln.204.1548141083358; Mon, 21 Jan 2019 23:11:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548141083; cv=none; d=google.com; s=arc-20160816; b=DTAVomvHDPDb0/gp9RjY40X/r8460dINSRYOkSoCYlBWlKjSSz+p0UceJxH7c5PfjG D6/YU32hkhn3ZK0JH8aWaaLQk2HB8V8oKozlBX0iBoRA+b3NJ8s4KVfOfl6bPvSKiYof lCyzBsLQf8rouFxB0QI4rRvUmHvHR+HJUtrBmbgbbYnvWSPGy6ALUPQ+GYeW2ZGTIdGP xwG99cj1htJ2QW9ribUuekrLB5lZLQwYGqtqoBrNiD5JITa4968asVx72Za5E/t1Hxp5 5+32AuRU+p8hdz/zwRW+3zrpP6yjDhuClz+5XqEP1Glkfp0u9s/FZ5kugquo2r86gjVo dAtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oCVppQxmkZXSCO8DambkFCmORWpSe6DSUbLfn9f7gcU=; b=IMxiQfTePvGA5c8TFRao9r3Z6t3+oX0jY2OqHtjwZNheO82Xe/bhX1Vu07ScUuBM3c 5rRIYy7UTTU0a3jXSsTv4Q2pp6h/f0xZSZLfqJI7U3+iPjEzw7VkbUklzkHQC3SVn2bn I4mV7c+9Ii7S57gJ/cSfkKoSUehaUdZ5SjOtTQcxgZUp8F/CSlMTZ/We6homP2Cnk2JH HgE0MDXFGbQkZ4/Sl1l/iFZrWzta9g6NA16wWZK9zmtBJQXZfr1Us6UOMjsXN6OFxvsJ 5Z+C+x937MvVdASAdeADjJQp9UVIA1YaZt+mLXV4Vokc3ME4ex971pBjeiWZsKTJaZ4o SxPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kJhuLPZh; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si15398442plo.422.2019.01.21.23.11.07; Mon, 21 Jan 2019 23:11:23 -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=@linaro.org header.s=google header.b=kJhuLPZh; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727275AbfAVHJk (ORCPT + 99 others); Tue, 22 Jan 2019 02:09:40 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38405 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbfAVHJk (ORCPT ); Tue, 22 Jan 2019 02:09:40 -0500 Received: by mail-pf1-f195.google.com with SMTP id q1so11311893pfi.5 for ; Mon, 21 Jan 2019 23:09:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oCVppQxmkZXSCO8DambkFCmORWpSe6DSUbLfn9f7gcU=; b=kJhuLPZhNYRktgvR8yDaVXOyiBae7j/vKLEnacYTouYXhPCuBPbNzGTnavVo/GEfX7 SVD/+bv4xCPytnQyfQspFtZsVf686Q75D61mRYcU6lkAXN5CYnqqeswO7J++P+oOd6HO 0QoQmclcsv7qsHR+nQ6z8BSj3w8Mg0OCY1KWA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oCVppQxmkZXSCO8DambkFCmORWpSe6DSUbLfn9f7gcU=; b=XV5lQpRBN4saKDp50Aj0Qpf6pbUzsIK8JKwJWYagQE1eS5T8rtF89A9CY+AwExAdt8 F3CPhy7vqJmXU/DtYDQ2Fvrm3tXRtXI/SPO0pJg61j51X3lHakSHRCrV/ar17h7bUEX4 u7i/Kc6Nf0rHqRQXLKDrAbWZZ8XY+NdYjNRov68sybbVtY5hRunCqh8hOa0yjPjDfPZY Nu2gTr2rAdVeZEiA8UfVgwG6g7Tc01Kx2sE1jyylQ7bV/av8lm1pwX7dgjoHGHZfVWBX 7RD2rjJx03nBvTsebgVcMwom6yyEqAQFBQtwtrQ5caBVneYAw3pezfrRAW9328AD6+Jr 3Jyw== X-Gm-Message-State: AJcUukdn8t6f4+0n8l5zvNkh9En5SeSOoyG1VTt086Td1DIErafKRol+ 7PXfUatNpN+jhj2TpbTcl15gfg== X-Received: by 2002:a62:9913:: with SMTP id d19mr32395257pfe.107.1548140978910; Mon, 21 Jan 2019 23:09:38 -0800 (PST) Received: from localhost ([122.172.102.63]) by smtp.gmail.com with ESMTPSA id z9sm36786541pfd.99.2019.01.21.23.09.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 23:09:38 -0800 (PST) Date: Tue, 22 Jan 2019 12:39:36 +0530 From: Viresh Kumar To: Matthias Kaehlcke Cc: Rafael Wysocki , Greg Kroah-Hartman , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] drivers: base: Add frequency constraint infrastructure Message-ID: <20190122070936.jsjvivzplfpdweck@vireshk-i7> References: <20190118010305.GX261387@google.com> <20190118100234.kq37hc4ldujqvvrb@vireshk-i7> <20190118224534.GC261387@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190118224534.GC261387@google.com> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-01-19, 14:45, Matthias Kaehlcke wrote: > On Fri, Jan 18, 2019 at 03:32:34PM +0530, Viresh Kumar wrote: > > On 17-01-19, 17:03, Matthias Kaehlcke wrote: > > > On Fri, Jan 11, 2019 at 02:48:34PM +0530, Viresh Kumar wrote: > > > > +static void fcs_update(struct freq_constraints *fcs, struct freq_pair *freq, > > > > + enum fc_event event) > > > > +{ > > > > + mutex_lock(&fcs->lock); > > > > + > > > > + if (_fcs_update(fcs, freq, event)) { > > > > + if (fcs->callback) > > > > + schedule_work(&fcs->work); > > > > > > IIUC the constraints aren't applied until the callback is executed. I > > > wonder if a dedicated workqueue should be used instead of the system > > > one, to avoid longer delays from other kernel entities that might > > > 'misbehave'. Especially for thermal constraints we want a quick > > > response. > > > > I thought the system workqueue should be fast enough, it contains > > multiple threads which can all run in parallel and service this work. > > Ok, I was still stuck at the old one thread per CPU model, where a > slow work would block other items in the same workqueue until it > finishes execution. After reading a bit through > Documentation/core-api/workqueue.rst I agree that a system workqueue > is probably fast enough. It might be warranted though to use > system_highpri_wq here. Is this really that high priority stuff ? I am not sure. -- viresh