Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1045858ybl; Thu, 12 Dec 2019 08:51:03 -0800 (PST) X-Google-Smtp-Source: APXvYqxGR/iEwdXGJIfUe0Qwb08BMeDABriENI0ZJIiz/R4jVpDSGufXnUCH63hohBQCv9TCmWe3 X-Received: by 2002:a9d:784b:: with SMTP id c11mr8587651otm.246.1576169463438; Thu, 12 Dec 2019 08:51:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576169463; cv=none; d=google.com; s=arc-20160816; b=rDX5SB0l52enW3koXI8dllu71IAX0JpM2cGFee4/KIj+DoVvILG7SzzFsFsqRlo5ZD 5C8fakatq6atwihKQ5pTxNSYPKDg1uU3pgzn6/vOlHN81N5YfCKBihDZZEP20FtqtrxI ZE4j467/C4zmjH39690CPXY9H6sE4MHlmG1iDjx1bJc9o+O4YZi30uQI3XhSi6oEclUm QJclhPQUGb5G+6vtTrr7IRdHSfQZHAWvmlCp+/x+DhxNSdQJ2mcbAx+VfQmCxw5uM1hR vtVSdOOXHRYFiFPQdYNhvi3nl/X8ZWmm37oXGstXg0WXbuRitPBnsJ+gNxyZhplH0WsD rn0A== 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; bh=eaCUUCpdZ+9jexLrCcFGczPuBpNoGYYZMgq+3l/E9xQ=; b=YSaECyrYAacYKfSn+9OMQz+EE6ArnUlRIhCJIhaVzcq1QbvmQVtf0z5CDATzknn6YB iNABQ92BmaXQMhJrcLeJyRAAVGTBl7AKC2c8sj9qFydWSlffXeMKAqbBsktqnsdhuT2Z CQTxlhhefmvWc9yvh2YycVJKFLsQjyqn+7PBL7Iw3MXAX7liXqGaFz5TieGqJ1HxDRH0 77o0jrhSp3JW8b4sXQb4b6LGC4012jbDrogdq44ZSBxLjNa4jDB+Tkr8VEGkZXCp2xS8 aSPDegW8j02Pvb9ZKpdQBtCUMqVpSlADEf/NAPs8C2obMMSOKvGNNCSBoIBS3JWf0CjM mw+Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 w29si3783671oth.313.2019.12.12.08.50.50; Thu, 12 Dec 2019 08:51:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729967AbfLLQuG (ORCPT + 99 others); Thu, 12 Dec 2019 11:50:06 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:45242 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729762AbfLLQuG (ORCPT ); Thu, 12 Dec 2019 11:50:06 -0500 Received: by mail-ot1-f68.google.com with SMTP id 59so2613954otp.12; Thu, 12 Dec 2019 08:50:05 -0800 (PST) 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=eaCUUCpdZ+9jexLrCcFGczPuBpNoGYYZMgq+3l/E9xQ=; b=i4l9Lk0XVMNukyGJcxO7E0U5Q9Jv98x4y7i8eTujCwGCKMtQ/r8aM1lwp8gOG7IUc3 T1+u61IvdwZ2SdS+jFeptIyp8LHhd9jvUnrVEfj+2uFUKQhgRb70WGwDZRX51W9lFuPA 7jwcOgKs/Of0r3O2+CDY5lahzGwVEcPuQwOoiPGO5lefsZqWWDpeJNCJg5QFDVQ+4k7J fGa6O+SqEAfW64cJMren2nU9bWVHDbVDuRqtWp9F1ZqldqLqKTjin0ouZkl/Nafwyy2x poBOb0FXrJs3XAjOL643wf1w7XqmXrO6kWjqFKQjT06xjI00Uga+0kKGoRSOXVu1aub0 Xg2Q== X-Gm-Message-State: APjAAAXIokBEml44bvZJqq0NFq7PHwlTqqZ0jNDFuO6fu7NYWbGerJz8 83woFNOCUsb8xpQXwaoGnBMnT96xL2veXmAvBuyJaA== X-Received: by 2002:a05:6830:95:: with SMTP id a21mr8617620oto.167.1576169405609; Thu, 12 Dec 2019 08:50:05 -0800 (PST) MIME-Version: 1.0 References: <2691942.bH9KnLg61H@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 12 Dec 2019 17:49:54 +0100 Message-ID: Subject: Re: [PATCH] cpufreq: Avoid leaving stale IRQ work items during CPU offline To: Peng Fan Cc: "Rafael J. Wysocki" , Peter Zijlstra , Linux PM , LKML , Viresh Kumar , Anson Huang , "Rafael J. Wysocki" 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 Wed, Dec 11, 2019 at 2:53 PM Peng Fan wrote: > > > Subject: [PATCH] cpufreq: Avoid leaving stale IRQ work items during CPU > > offline > > > > From: Rafael J. Wysocki > > > > The scheduler code calling cpufreq_update_util() may run during CPU offline > > on the target CPU after the IRQ work lists have been flushed for it, so the > > target CPU should be prevented from running code that may queue up an IRQ > > work item on it at that point. > > > > Unfortunately, that may not be the case if dvfs_possible_from_any_cpu is set > > for at least one cpufreq policy in the system, because that allows the CPU > > going offline to run the utilization update callback of the cpufreq governor on > > behalf of another (online) CPU in some cases. > > > > If that happens, the cpufreq governor callback may queue up an IRQ work on > > the CPU running it, which is going offline, and the IRQ work will not be flushed > > "will" -> "might" Well, I'm not sure, but OK.