Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1324774pxu; Fri, 16 Oct 2020 09:12:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycCdUjq+2HvEBLpbIYnZYdTpkeqMrZDWGJDUmjXMW6/FYGP1hUPouvBHLEwLw7E9VLeDIN X-Received: by 2002:a17:907:2056:: with SMTP id pg22mr4690269ejb.177.1602864727474; Fri, 16 Oct 2020 09:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602864727; cv=none; d=google.com; s=arc-20160816; b=TwtAcL8St0FoXfG16J1tgKsOS0/ekQWtCNbkrfNuAhUUZwluh1mzESJRZRwrMW5EFc nt3VJPN1+dfjIaAx69jf5J+mrM7mZw7auWZeKgNDLRRpWGuV9noV3kN5o4LrIwpePf0j i4L6nCGX+P2vS7+1wk7YE7ONHnlpm03kDe9Z7XfjBs3VeiSa9UNaLOq86PRwLs2UxK8/ IkSwLG+Q7qkYv4YGahFFgMmwVj59Q+ZxklEiqLhdUh2P/zXSrFDjwnymxHgRTrZ+nGDo 8aQSv7/z/3mS7smGsHsa2IDVyhZJJe7o1eobS9pdqGpQFdgESWXw1Txw0ygdLKly4KwJ m0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=d1cWWdYktv9KzOmDwgjjOczko8U/7YWosUu3S0VLH7A=; b=phx/vWXaGcXpUf0Igc1wUtJC70mF7m+rChENPkUIZBPdOK5Is7cTwSZvpGw2qGaZGR 5e96490oM7mptQdRYI1DDhHDRNoa7phxM52qCy8J+S5WnmvYKnK081rGFQP+jiAocc+d 5LPYZUYe+1y8Z250HqE5oVsBocloEHdaIarvG2CoOzb/V9smw5G1iZUpZVo5DRTl9u6P dsFGQfxz/+a3pCJfc6wUZ/PiG+8MbOzXlbyBOosyTQhMGaz/7zg7EcrZmSARRx7vLtJm 19hOKhGvXC1wyH635bRuPeWoaLKT0j2ZJZ9WIWiveMPUihS4rQiACuWwTe/B2/1IEuIK papA== ARC-Authentication-Results: i=1; mx.google.com; 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 x15si1955088ejf.349.2020.10.16.09.11.45; Fri, 16 Oct 2020 09:12:07 -0700 (PDT) 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; 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 S2409197AbgJPPLi (ORCPT + 99 others); Fri, 16 Oct 2020 11:11:38 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:45509 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406926AbgJPPLi (ORCPT ); Fri, 16 Oct 2020 11:11:38 -0400 Received: by mail-oi1-f193.google.com with SMTP id j7so2750686oie.12; Fri, 16 Oct 2020 08:11:38 -0700 (PDT) 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=d1cWWdYktv9KzOmDwgjjOczko8U/7YWosUu3S0VLH7A=; b=dF8bUXGCAnZgBFj4ABCpa5eHLuoVdUhP4OJspb+JDvYNVKgCIFQQPme/UVJroPS2Gl zehFvIfxmn8u0pQwD4juBtnIzs5S/YPfZxSN3fcP/HZroJUKRELtdpsdAeMIUQG9FG7c mtuqf4qPBxYOXeurHwmKK4EAmDjnSOaHIk9EMV134/vFSR23s8I1JqqEA8R8UQwKLaqr Gy/b6lhFQQrlPathVUA0NpEl1nKnho7qpzOSgvhIsATP3wVl0J1n0uHG9eDZC5B+tkbt LCtGkmGX8zFgO3WVGx0oVkrZ1BDREJhR4iDNlWakULhchq4K2/3d2jWYTF6q0woPytg7 a+eQ== X-Gm-Message-State: AOAM530vUdRN4BUqYLBbOFsVIEQXMCsCcbc7S3ToTuWHkt8pvifpj2eX Z1fYJI8ylHnCZvZc+Cis+GyuxvmNMP3kFLf26xs= X-Received: by 2002:aca:fd52:: with SMTP id b79mr2806924oii.69.1602861097688; Fri, 16 Oct 2020 08:11:37 -0700 (PDT) MIME-Version: 1.0 References: <20201012125033.2809-1-amonakov@ispras.ru> In-Reply-To: <20201012125033.2809-1-amonakov@ispras.ru> From: "Rafael J. Wysocki" Date: Fri, 16 Oct 2020 17:11:26 +0200 Message-ID: Subject: Re: [PATCH v2] intel_idle: mention assumption that wbinvd is not needed To: Alexander Monakov Cc: Linux PM , Linux Kernel Mailing List , "Rafael J . Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 2:51 PM Alexander Monakov wrote: > > Intel SDM does not explicitly say that entering a C-state via MWAIT will > implicitly flush CPU caches as appropriate for that C-state. However, > documentation for individual Intel CPU generations does mention this > behavior. > > Since intel_idle binds to any Intel CPU with MWAIT, list this assumption > of MWAIT behavior. In passing, reword opening comment to make it clear > that the driver can load on any old and future Intel CPU with MWAIT. > > Signed-off-by: Alexander Monakov > Cc: Rafael J. Wysocki > --- > > v2: reword remark about WBINVD (Rafael) > > drivers/idle/intel_idle.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > index f4495841bf68..6d87f2129119 100644 > --- a/drivers/idle/intel_idle.c > +++ b/drivers/idle/intel_idle.c > @@ -8,7 +8,7 @@ > */ > > /* > - * intel_idle is a cpuidle driver that loads on specific Intel processors > + * intel_idle is a cpuidle driver that loads on all Intel CPUs with MWAIT > * in lieu of the legacy ACPI processor_idle driver. The intent is to > * make Linux more efficient on these processors, as intel_idle knows > * more than ACPI, as well as make Linux more immune to ACPI BIOS bugs. > @@ -20,7 +20,11 @@ > * All CPUs have same idle states as boot CPU > * > * Chipset BM_STS (bus master status) bit is a NOP > - * for preventing entry into deep C-stats > + * for preventing entry into deep C-states > + * > + * CPU will flush caches as needed when entering a C-state via MWAIT > + * (in contrast to entering ACPI C3, in which case the WBINVD > + * instruction needs to be executed to flush the caches) > */ > > /* > -- Applied as 5.10-rc material, thanks!