From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 449AD28E7 for ; Tue, 31 Dec 2024 03:18:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735615137; cv=none; b=KGsA1kUpGU5a33WBUU1hzHtDdrPeC2yVGKa1kPqxoL5AglASV2v/yBwU2qU7MFf8lJnuGhxa9Vpbilj1O+xx6yBNDuR/769HOkwcMoCF65Ig50Ba+YNuMIExeiIlPPZIwZCzmTN5F2sgosC2ZstPv11bz48pyOaPXsUBvj9iZqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735615137; c=relaxed/simple; bh=ZiaPTVhOCTgacMTOc7mRE4UMEXiVw2+C1pm7qGGRugY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kYSht2ODJz18gW6eiiL7ZgGh0Of85n0427VdG62EonL9hqDtq2oDhH7V+pcWQBKCcIpHcz1S7QfKiIl91HayFS5mAtU6ds2J1cct3z3h0mEjyavXXT9hpzl89cZQaBi2ujuNLxbDZPysg6+vzKq2XJd2q+ZWywWACet0/yl/1eE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=bP2k04Rk; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="bP2k04Rk" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-216634dd574so85229865ad.2 for ; Mon, 30 Dec 2024 19:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1735615131; x=1736219931; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7zo370Vm/uei4aMsevMaKzbPlMUBBOnYJ/SJhXkOZws=; b=bP2k04RkuBQ6DYHf9+lGsY3VCvWpBm3xw3z2Y+5y6ukH5kqpaqaqGBU2IYk//YBJKX muOPi2QMbSUQnIKNBqS7uM4fNAWTA5fYafMEP3oq315aF2b/5IQ/jrlgqsNHCqzD+ynq JEmxYMVSv3CpDI3207azrq+mxduhgjkWkDb9TRxcqWQvT/zhvktNWOmPzx3IAHOR1/vS j+gtG5hZD793oDjsebDSGwejGkiaa29cHW7Ks9WdGMLYJY3p5w1jSeFiUm04bI7hDcAn YYkXEO7pDNX1OeImKa9HpuMGaPJxLjQ0+iwC0GLYbx3X1M7/R3dl5FAodgKMqsxlmsl4 hNHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735615131; x=1736219931; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7zo370Vm/uei4aMsevMaKzbPlMUBBOnYJ/SJhXkOZws=; b=gFZxNqcXu2X5qiQUC3ZfcG2iFveycJ21tUw93QUogfjIghPrCRmZ/9BPM4X38bhbHI AoXpLzzSKFHVtHSIBhtabboXs5l7+m2xyHMjYU/YsKlhPQa1vsOKCJurSe9CnwXXxDSG lGAAgBheENH4HJ22ionqO+ERSGRj7Vel8Iwm60rFAL28gDUw/5o7Qm45lSr+AD/ota80 dpBNX3vKs44aMxen5Zfu+C2CTWGVlZEkaFuXXS7B3GWmZDjxjybWGTMgTWkN0OGnNUvW J7cwah7GAj1U6QAfDwX+rtM32M4/QK3ZWb7EaP3vbW7sQwZRUAXTV1KZtlB9nasMMRlU FK1w== X-Forwarded-Encrypted: i=1; AJvYcCW0pHHVDmEFTQ8NHQL1FQzMTML+MrnxMdthzBdkJVlgtjgz0YAmNVAdu2voTnBwr/tcW1tBxeqTwUDitW4=@vger.kernel.org X-Gm-Message-State: AOJu0YzWm2j2iGEVZ2AoHwJxVQs5FJWpB2q1HXe26hQajqH27GNKHc3y JZxpNvhwpwfp52GFmx7zJnDVgmw9gOuk9LPBuNw1QoPHTGzD2BU1xNqhtFCZYVA= X-Gm-Gg: ASbGncslbLxnJAC4X1JIORHAd0tZm1IKTrzmuf4XuG7kBIE1ssnz1227OZ6priYEf+P yVo040ZPjhE0sugj1c6O41WrIfP00ToaEEG1rjH2IP9M4kj6uE9Als/RyJhYKzWmxFc7gF9/NMg 3cLrmspDTrtaLuqYZDwcd1zV44+vgs8H40bO5+di9RHMVcp2kWwCNHm3KqP1CuDkLE+RvLQnbmT RkZbDuSZTwXrjyIQZHLnC/9VZxYpIBwqjbDy5vnC6GQ2vZQTDjBn4jShJ4DaX4612++3nH27X1a NijLqg== X-Google-Smtp-Source: AGHT+IHUFtnFGBUg9VKIMxQ9+h2qGO/fJ57n3azK0YDNIIwaL951XSJv1sYjQ9BPoBGXxPbZUmpqXA== X-Received: by 2002:a17:902:f606:b0:20b:7210:5859 with SMTP id d9443c01a7336-219e6f1457bmr582787485ad.38.1735615131505; Mon, 30 Dec 2024 19:18:51 -0800 (PST) Received: from [10.84.148.23] ([203.208.167.148]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f6285sm185590235ad.215.2024.12.30.19.18.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Dec 2024 19:18:51 -0800 (PST) Message-ID: <9f44fb9a-353b-4d50-b2de-497c87fcbb97@bytedance.com> Date: Tue, 31 Dec 2024 11:18:43 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/12] x86/mm: remove pv_ops.mmu.tlb_remove_table call Content-Language: en-US To: Rik van Riel Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, akpm@linux-foundation.org, nadav.amit@gmail.com, zhengqi.arch@bytedance.com, linux-mm@kvack.org References: <20241230175550.4046587-1-riel@surriel.com> <20241230175550.4046587-3-riel@surriel.com> From: Qi Zheng In-Reply-To: <20241230175550.4046587-3-riel@surriel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/12/31 01:53, Rik van Riel wrote: > Every pv_ops.mmu.tlb_remove_table call ends up calling tlb_remove_table. > > Get rid of the indirection by simply calling tlb_remove_table directly, > and not going through the paravirt function pointers. > > Signed-off-by: Rik van Riel > Suggested-by: Qi Zheng > --- > arch/x86/hyperv/mmu.c | 1 - > arch/x86/include/asm/paravirt.h | 5 ----- > arch/x86/include/asm/paravirt_types.h | 2 -- > arch/x86/kernel/kvm.c | 1 - > arch/x86/kernel/paravirt.c | 1 - > arch/x86/mm/pgtable.c | 16 ++++------------ > arch/x86/xen/mmu_pv.c | 1 - > 7 files changed, 4 insertions(+), 23 deletions(-) This change looks good to me. Thanks! In addition, since I also made relevant changes [1], there will be conflict when our code is merged into the linux-next branch. Of course, this is very easy to fix. ;) [1]. https://lore.kernel.org/all/0287d442a973150b0e1019cc406e6322d148277a.1733305182.git.zhengqi.arch@bytedance.com/ (This patch has been merged into the mm-unstable branch, and we can also see it in the linux-next: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=62e76fb4ff704945b5cf9411dda448fefb6618f9) Thanks, Qi