Received: by 10.223.176.5 with SMTP id f5csp644978wra; Tue, 30 Jan 2018 17:06:29 -0800 (PST) X-Google-Smtp-Source: AH8x227f2XYMijT4nKuwV7r2OPQiBSkbXK+VvJc97IYGzC0Vc8ir7gHj9flF6gZh5wSM59DvGSMs X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr18196613pld.17.1517360789437; Tue, 30 Jan 2018 17:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517360789; cv=none; d=google.com; s=arc-20160816; b=FyGmaFE24uKRcTblSELeV27z519KlaLmqZjRHMdfA6XE7lLIoAfT0ryLk3w0S4o/mM xngMaKdk/rYr+1lqE7fy+3qIDTRtzK6sV6BsfJ0cwujZOMQaxVeJqtp4Q/nNOZPiMc6l AmR6jaKrCJN2/3UqjEiu+znMm6c5E8IASQtMixs4SbPC5P5YXxrgp4nxnj2+gxc4xNty LKo9WtuA5fj+Idg0gdXUihrdatAsCTudGIkBUQOzOnRyFygPgAt+VWgoXGUvgAA5r1Eg 8UQTDULM5HqNJDCjdr7LDsSoo9wstRPGPy4JXTmiQ2kY7LX+1BKETW98W2YWAB5T/u1+ fllg== 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:arc-authentication-results; bh=JQtVr04SxOfEIkpG1BtF6w6KSslhl3sMsf0UPgdbbZo=; b=nUwgHnTV/SEo04jmA+O3xVC9uxzSOj0vzndFm4AeTzQzGIXTN8eF59MKQTOz54RSoE U3z/JhmPrTrqbKnsHQi2CSDd1ZP7gNsC4z8s+uka3KAIb4342jphDHW/BGwUC6GAO2FP H6ecFA6w52Bxf9J3wTND5hdx2EeCu5j8WFYHVQxqqmvJjJ85JIzmI4bEeUhC07qLt9nn G3wZ2aIAygPhcyXygnkr2r8yOCKyATWEzdEMP2ki8l7KN9B/uINalMS7oeQ7ZpYHUYwd nnOc0XQlYP1V7EcpvqP14ySWStH55iE7o4cV5XjqZhBlRwzH8C0I3ZOGCJYcRhq1oS9m ZAuA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si726438pfe.350.2018.01.30.17.06.15; Tue, 30 Jan 2018 17:06:29 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932320AbeAaAmF (ORCPT + 99 others); Tue, 30 Jan 2018 19:42:05 -0500 Received: from mail.skyhub.de ([5.9.137.197]:55690 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753286AbeAaAmE (ORCPT ); Tue, 30 Jan 2018 19:42:04 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kfM842WsSNbF; Wed, 31 Jan 2018 01:42:02 +0100 (CET) Received: from pd.tnic (p200300EC2BCF0F005D4DFBFD0E3B986B.dip0.t-ipconnect.de [IPv6:2003:ec:2bcf:f00:5d4d:fbfd:e3b:986b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 923EB1EC03B9; Wed, 31 Jan 2018 01:42:02 +0100 (CET) Date: Wed, 31 Jan 2018 01:41:55 +0100 From: Borislav Petkov To: Tim Chen Cc: David Woodhouse , arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org, mingo@kernel.org, luto@kernel.org, linux@dominikbrodowski.net Subject: Re: [PATCH] x86/speculation: Use Indirect Branch Prediction Barrier in context switch Message-ID: <20180131004155.r2iz6vl7mmlav2yn@pd.tnic> References: <1517263487-3708-1-git-send-email-dwmw@amazon.co.uk> <20180130203836.bsgme6kf6hstgbrx@pd.tnic> <024dd53b-1912-34fa-deb8-550c111df521@linux.intel.com> <20180130215731.pszc5u4gcc32ds4v@pd.tnic> <296de30b-515b-6eab-1b13-bb2f71451004@linux.intel.com> <20180130224340.2zdfqttupugtqww5@pd.tnic> <74fd9c82-cd18-562b-8df6-69f629da460b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <74fd9c82-cd18-562b-8df6-69f629da460b@linux.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 04:25:26PM -0800, Tim Chen wrote: > As dumpable is a property in mm->flags, it affects all threads running > on other cpus sharing the same mm. It is not about sharing the same mm - it is about sharing the RSB. How many logical CPUs share an RSB? If it is per core (which can have two threads) then issuing the barrier should have effect on both threads. Thus one barrier is enough. IOW, the granularity is determined by how many logical CPUs share the RSB not by how many logical CPUs share an mm. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.