Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp256088lqk; Sat, 9 Mar 2024 08:34:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX05N+HtwjCNB9yB3lH0/VTu6bmiG+EbqzA8iqdDI/mftAQLz5gSGoaCp5TOA6bb1vQ/c3KNkxDtdfb24qGzNmp9nYf8q1FYjx4DQobyg== X-Google-Smtp-Source: AGHT+IEQLUA3iIK57dQHDKrtiPoOzihU9kTttGr6KaQEAj+1PScN2YwrM9u7co6d0pu6SXqeLsHt X-Received: by 2002:a05:6a00:2406:b0:6e6:5011:80c7 with SMTP id z6-20020a056a00240600b006e6501180c7mr2495955pfh.10.1710002091418; Sat, 09 Mar 2024 08:34:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1710002091; cv=pass; d=google.com; s=arc-20160816; b=jeawzDUQni47CjwZCP6wCQVUQF5BesfMXbHz+2/0n1SL6+udauvdwJoKARa1urbgaX A+ezWLwTwj/GrwWzjUdJJVlv+9C49p3JCyj/t6F7BEvIR5rwfdfMS2VlO2+acKf3aFHJ c6feVZvQHRlOacyR77OVbIJ6dwoYvIlpPazKcgnzVERwHxPoxqTdjSytmAjR73lWxYOL oGTC2JCNhxLaU8frl36oosj6Flb0yGvW4LPnyxTHSY5/Qk6ERsc4bs2oE1GlaaLXcv7S qOgvCshlq8BFZB0MmXTTQWB5o+R7CXMH7Iuwkd+nE6kDqnv76XktkcyhUE4Io2t0YZ5/ ZkXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x+GNATMhIDiu+kb/rARm8mpEA2Vxheo9+6lg+XEaMJI=; fh=ph+DQeP2MZa4aqXYmI/PlPEcF5zbUh8NRA5NutzkrU4=; b=lSc8RIW/p1IZbumEpwBQWWshGV5TfPG7ITXM3YbD+ttwuiB8+nA0bmrJfYlarBqBT8 PQhPoaxcfDfExNrk+oOyjyr0TnPAzUlzweocSAFCVI0CXCOk9aVqNXf1/LdFjZPnLLb1 0jAYXBPUxXd5G2I43Bc7IHA+5CNiX/K8Uwej8Vh9067znOBbxNJHD4yaOdcJV0uIhqVM 3yfHU6npkeSAP0QHxIIsPjD1py/evvQRRNFj8I5nZ3AkB+UbXTNMPRMgtyuMVBW1hsan 7OASB5ZgDNeeytZPChIc28HQj/j8rhzYVcQUx+eqyZnVyGNkqJMUPKVuD37Mw3o309TY fQSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cQqEUhko; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-97959-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97959-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w17-20020a63c111000000b005cdf992367csi1715270pgf.691.2024.03.09.08.34.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 08:34:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97959-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cQqEUhko; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-97959-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97959-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F05E281A04 for ; Sat, 9 Mar 2024 16:34:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB8004A26; Sat, 9 Mar 2024 16:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cQqEUhko" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C81915B1 for ; Sat, 9 Mar 2024 16:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710002084; cv=none; b=NYFh3BmG4SRgOBZD2Nv5CNZs9YV2Qa0WShl38fPKEuPwYm44QfqYcDeuoJ58WwOmqpX12b541dZu9Us6PIv6tTzPu5e8+r7JEyT8WxsdBc9oB8RhAxgspkJbQMOt/x4wbMx2r3KrMN5BqobEdRhbG0Sqw8wxFwJZKWh5mWAqK3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710002084; c=relaxed/simple; bh=DQDKbUDAAhaEkqP/f1HxAcFJ7R5k8edp3JBjX62hW+4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LIzopuhOcr3VGtw/XFLPJbPiMu8ijWv6moCxRByGaS+LA6u8ZUGfP70h6LduSfYoZ8V/PmoO+Ni5njVpM4S1CAN8FStcYYTdiVb1VPsnRCCQH5e7jnpEoHrOAJAyzVmWdxDtpIvg6Tr4KYycHr7gaZONTFizja1tcbBo1xOaT2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cQqEUhko; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710002083; x=1741538083; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DQDKbUDAAhaEkqP/f1HxAcFJ7R5k8edp3JBjX62hW+4=; b=cQqEUhkoPSt/+OY+otS+WSwxe0rrM64N+F/5qmzZbV7AGZ7YzF3Zim6p V/X2DIHXqX+TQFoWKIVq84sOPJ03O/UDIhTBqIh/1DmT6FtH1hqQbR2eO ynFkdiVVRH89YbPM8cXfbHEAoECNb9iQF30Oy7JLJCGs5YnYFLa8bQrY1 QBdfPhqUMAptHQVGU1bjRtmNK8rZD/PTjZoK6UgZAV9rU2eqvGFzOV4Jq khtsA5O0Er2qYsTF4T+Oooqa8vL2bOdlbFBWjABi/2mn9ONAAgcBZUu9V yj+ldOio3zziLLBYTVReBf37QlUk1iLG5myHlk1x/mnjBrlVyy7MWy4eY w==; X-IronPort-AV: E=McAfee;i="6600,9927,11008"; a="22171187" X-IronPort-AV: E=Sophos;i="6.07,112,1708416000"; d="scan'208";a="22171187" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2024 08:34:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11008"; a="937048341" X-IronPort-AV: E=Sophos;i="6.07,112,1708416000"; d="scan'208";a="937048341" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 09 Mar 2024 08:34:39 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 897662CB; Sat, 9 Mar 2024 18:34:38 +0200 (EET) Date: Sat, 9 Mar 2024 18:34:38 +0200 From: "Kirill A. Shutemov" To: Yosry Ahmed Cc: Dave Hansen , Andy Lutomirski , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "Peter Zijlstra (Intel)" , the arch/x86 maintainers , linux-mm@kvack.org, Linux Kernel Mailing List Subject: Re: [RFC PATCH 2/3] x86/mm: make sure LAM is up-to-date during context switching Message-ID: References: <20240307133916.3782068-1-yosryahmed@google.com> <20240307133916.3782068-3-yosryahmed@google.com> <420fcb06-c3c3-4e8f-a82d-be2fb2ef444d@app.fastmail.com> <35b670e2-9ef5-4d3a-b6ea-f8016dfa088d@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat, Mar 09, 2024 at 02:19:19AM +0000, Yosry Ahmed wrote: > I don't see how skipping set_tlbstate_lam_mode() for kthreads fixes this > problem. Do you mind elaborating? Define what problem is. Yes, in this scenario kthread gets more permissive LAM mode than it needs. But nothing breaks. -- Kiryl Shutsemau / Kirill A. Shutemov