Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4135977imu; Mon, 10 Dec 2018 13:48:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/WwI/kbM3I0+EK0wn8PqpX0S5l6anxz5vjFDpWv7WICsrpskijnVMg0CNrGlrfU4wETaANx X-Received: by 2002:a17:902:bcc7:: with SMTP id o7mr13931110pls.281.1544478499155; Mon, 10 Dec 2018 13:48:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544478499; cv=none; d=google.com; s=arc-20160816; b=T/Uv2pcK359xGfj9u/FuB+qe+LTarlrfuI5HLSC1egKdl/HmzTyyIoUcSarEc53Y4y rW0KDpc20VkFXEqzSAAeSdSSRSlysMhB4WVzd8nq4suOvtUU6i8EoX5+i/ODinHJI9od f3baA07vNvwFR/nDqibjzTFQxS2JPVgMHCHc0xf0Kw6j7ZHxG2vB34heasIJVarl0eNl 800ikUKmsl6zF2GTuhc+C6ovjJmB/MgfALIpDA+GIaqn/FUYf5wTrtAy50Lif7DYiuMK rVBuR/eHaMdXhE39ErLBaT87zAik4nW0sJLcgNakhS9m+1RBUr3SrIZtViyxCAFYl4rv Adqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=1VBT2L2fJ+SjpyxIgRiCXkdhj1PWMiRhUMfGPw/OhoQ=; b=bfsV3op1Sp32i83ivs/PinCOmBxAE1B7EGJZD2bcHKcS6pkBtrVOnh+0uDNVmoi8FQ Nh34IPGW0DNeM70jmuUwDGAInXJ9Skfp11IyzE03GwcOhg8x9H+imlISAMfDhbrPG2EP qgZ1Ewb2/PJ1RoB4PrjCMa/5oLgg7suLFDADZH0i/wd3QN0Kda6WPlZw7vQxj1/zVEum zxEXEliEbe3ot7IXujNzJMeDGVA8HLMsriIAs1ZxHqWZpgKJ6u6KRdYXdI+KdbVfnssn iEh8iKd5ubTvsrrZcEzulEXXoZ52NAfrTPsxc+6Miry8Zj1V288HwUWsQG+xSi4jgDf6 MOsw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l24si10498505pgb.489.2018.12.10.13.48.03; Mon, 10 Dec 2018 13:48:19 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729429AbeLJUvg (ORCPT + 99 others); Mon, 10 Dec 2018 15:51:36 -0500 Received: from mga06.intel.com ([134.134.136.31]:60402 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbeLJUvg (ORCPT ); Mon, 10 Dec 2018 15:51:36 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2018 12:51:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,339,1539673200"; d="scan'208";a="117231463" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.24.14.96]) ([10.24.14.96]) by orsmga002.jf.intel.com with ESMTP; 10 Dec 2018 12:51:35 -0800 Subject: Re: [PATCH] x86/resctrl: Ensure usage of CPUs are locked while needed To: Borislav Petkov Cc: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, jithu.joseph@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <725073a1f4448e3c45ed7102229e6946ca2526d8.1543428144.git.reinette.chatre@intel.com> <20181210204915.GH5482@zn.tnic> From: Reinette Chatre Message-ID: <27626243-cc7d-d289-2ebd-de5c8cc193e2@intel.com> Date: Mon, 10 Dec 2018 12:51:35 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181210204915.GH5482@zn.tnic> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, On 12/10/2018 12:49 PM, Borislav Petkov wrote: > On Wed, Nov 28, 2018 at 10:22:07AM -0800, Reinette Chatre wrote: >> The user triggers the creation of a pseudo-locked region when writing >> the requested schemata to the schemata resctrl file. The pseudo-locking >> of a region is required to be done on a CPU that is associated with the >> cache on which the pseudo-locked region will reside. In order to run the >> locking code on a specific CPU the needed CPU has to be selected and >> ensured to remain online during the entire locking sequence. >> >> At this time the cpu_hotplug_lock is not taken during the pseudo-lock >> region creation and it is thus possible for a CPU to be selected to run >> the pseudo-locking code and then that CPU to go offline before the >> thread is able to run on it. >> >> Fix this by ensuring that the cpu_hotplug_lock is taken while the CPU on >> which code has to run needs to be controlled. Since the cpu_hotplug_lock >> is always taken before rdtgroup_mutex the lock order is maintained. >> >> Fixes: e0bdfe8e36f3 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") >> Signed-off-by: Reinette Chatre >> Cc: stable@vger.kernel.org >> --- >> arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++++ >> 1 file changed, 4 insertions(+) > > This looks like it wants to go in now, right? Yes, please. > > If so, pls redo this patch against tip/x86/urgent which has the old > filenames, before the resctrl rename and reorg. Will do. Thank you Reinette