Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4668008pxk; Wed, 30 Sep 2020 08:41:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKbA0+8nKaIaETVUnm0DbX5t9vsaVAcdRQFMnweUtrq4ipJIXPUsbxWvYnL7goFkG1JV6y X-Received: by 2002:a05:6402:1b9a:: with SMTP id cc26mr3360728edb.30.1601480492778; Wed, 30 Sep 2020 08:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601480492; cv=none; d=google.com; s=arc-20160816; b=T6WDLDXd2svqtvZc12/Z+Sby4tbKnfUbColOji6vKTm+blPa6LBTTwmk/cgWQMrVjO yExFZ6DPkesikVHfSGNxrLjXJtSqUwpQ71nY5/3mx3PKWa3uD9VpzqPl3TJmr1fbHVYm BLw3SlOK6uzL/P2ZML5cvZENetpv5hApBhkPehTBaX/JSk0fKmgx9iMbD62xDGGtFGY3 izKKcvS0pfa1fGZmKfKf0lt9gBIzPm1fjXeHRdzcWqc+eSXdQm+wPT939QyUCIcuPIrz BK9hLNX3VqAFRd9Ha+GD4kGgXbKp7NszVyd8WYLrxzqERWRSLpIKlrDZAS9COgR8Uzoc VRZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=M7YqpSi/gchlZo1XYn2OS8SQwqgY1vMmSsPWUH7WJOQ=; b=yps/QrOshf17KiD3as1HnAcMLcpuvEh8Ma8LLTnbEerXjkJEptCfFY5rpwdceOjH5C wzuKbqlYK9BHQ7m9x0Qy39sZrIQv2AYIA6cSveyu0/Du1Fb/4/w1r+69s1oTiCiVCURO hKfIIcOK4INcTpZqrAVQu5VMqexEprBYgyKs8d9hlInbAXYhUXu8k6Lk8TCKPem9NtPR 7xeVu2Yt3YSEZW+2BqBZLqktOqrhmtwUppUFF/MYyO0PcjjaIqgAoY/1qL3og4uM85i1 Ah+tzZP9hLKFPa3XAl9Y+J+QXzYeC6dWjjeY6ILUqAVas6i6d19xqhzJJ4Wh4eGWWGMb iPHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0VyOEBUA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=958au8Vt; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si1248023edy.401.2020.09.30.08.41.10; Wed, 30 Sep 2020 08:41:32 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0VyOEBUA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=958au8Vt; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730993AbgI3PkL (ORCPT + 99 others); Wed, 30 Sep 2020 11:40:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728063AbgI3PkK (ORCPT ); Wed, 30 Sep 2020 11:40:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E552C061755; Wed, 30 Sep 2020 08:40:10 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601480408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=M7YqpSi/gchlZo1XYn2OS8SQwqgY1vMmSsPWUH7WJOQ=; b=0VyOEBUASaUq1pAri2nZThiCyNFYaAlRte0gRo9ECbuKQxKhrNN2+L2ae6kKKUNT2fCbEI 5nMtew6K+pzUe8J8Mfovt43mJ//FEGKd8Q59Qy85uiO7sLOQAIg/28sTUQLmUBLsCktbId 2uW3VY2qGpPD74fGWdP1FHD6Rq/6C2LEkqLy8sBIHCj66J81xg1VgF3MSS85+DsNcqT33/ 5JtLGuOwqALU6FnqfHMRLQwzUCILW/pMp6OEd6kd8YzxfrC/hNKT9+QWQjOE1mFycp1x6t qquSn8xfa+rLfkQhfFjh3ZG0TiQo2LTW6U/AnDEnzTHOuzVuyUA1z8Rb57eMOg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601480408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=M7YqpSi/gchlZo1XYn2OS8SQwqgY1vMmSsPWUH7WJOQ=; b=958au8VteZueoBrwGAHl6FRLloLkA5tKGZWimLrUSHh8xR0S6sSL/iKgd34ICNjuG4sdfu 4JXwq0TZUwU+66Aw== To: Peter Zijlstra , Lukas Bulwahn Cc: Balbir Singh , Dave Hansen , Andy Lutomirski , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, kernel-janitors@vger.kernel.org, linux-safety@lists.elisa.tech Subject: Re: [PATCH -next for tip:x86/pti] x86/tlb: drop unneeded local vars in enable_l1d_flush_for_task() In-Reply-To: <20200929083709.GC2651@hirez.programming.kicks-ass.net> References: <20200928124457.27289-1-lukas.bulwahn@gmail.com> <20200929071211.GJ2628@hirez.programming.kicks-ass.net> <20200929083709.GC2651@hirez.programming.kicks-ass.net> Date: Wed, 30 Sep 2020 17:40:08 +0200 Message-ID: <87eemji887.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29 2020 at 10:37, Peter Zijlstra wrote: > Here, I fixed it.. Well, no. What Balbir is trying to do here is to establish whether a task runs on a !SMT core. sched_smt_active() is system wide, but their setup is to have a bunch of SMT enabled cores and cores where SMT is off because the sibling is offlined. They affine these processes to non SMT cores and the check there validates that before it enabled that flush thingy. Of course this is best effort voodoo because if all CPUs in the mask are offlined then the task is moved to a SMT enabled one where L1D flush is useless. Though offlining their workhorse CPUs is probably not the daily business for obvious raisins. Thanks, tglx