From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x226nlJpx4qsGT1ZVpValmA/SMu1QRPhAHJz5vnpXaRWgKTfr4eXsxAS4g9zS/O98I9HqG+l7 ARC-Seal: i=1; a=rsa-sha256; t=1517359323; cv=none; d=google.com; s=arc-20160816; b=HqVVUquqQ4QJZFU+SEm5kmPk0D6dUpBeqkiyJYDtqMgAmLWfGkBwghIDgIVU8d/Bb1 51JpWJGCGvLY79wrKi/ejRNT6PYm7eIyLSEhMvTciY+QLMs9d7k9Q1qN4wng2t8nFDgw 8EpscmrgEZL/Xa2yHv50gRl9nLzyNkDHyF1vBtVxiDxUcEHiSXnL2NTERgqBUWB2mQ7c QtR+Ry7oSNgT5Flbv9mgkcqy4rCktXTcrZHTgKxNsA6kWLJMBDZ5raSTJOhSNecFMHJr 9d8NgMeTXMdDprWoBDb7pXC+Qf9+mn81x97FflNUd8hYktdrTsQzs5zWmSrE922eElxS 1GnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:arc-authentication-results; bh=JQtVr04SxOfEIkpG1BtF6w6KSslhl3sMsf0UPgdbbZo=; b=dLCNeRNMbkZz7rysFenSh+N9PJceL7P5xv6swIkx3shm/Lart4HjFShwGlRk66X4XA e1rb1+1J1r+F6tEbkf5lQlg4ctYhaN3vp6KzWE1zZX1tbFlh3qbTpGArIxciIq3DZl/y 4mGiQj27N03bMapTmJDgD77Xvwts3GrqkV8V3MPQTuuVc6mcf6AU+LVP4TiK9SJPrKCi 646o8+XIDYTrY5bJv591O3P3wt+FZoGymXRa+bhHs/BRbOAMQ2oa9J/YL9BDhvCPVQuf 3+fokV7Mscxo7Rsoq3r/7Erd7ILaPdKw0iZSb2fSo72q83CJuyPeQxMJiuwLHb7YwrzO Mi1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of bp@alien8.de designates 2a01:4f8:190:11c2::b:1457 as permitted sender) smtp.mailfrom=bp@alien8.de Authentication-Results: mx.google.com; spf=pass (google.com: domain of bp@alien8.de designates 2a01:4f8:190:11c2::b:1457 as permitted sender) smtp.mailfrom=bp@alien8.de 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) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590966106432961445?= X-GMAIL-MSGID: =?utf-8?q?1591066569702246501?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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.