Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1267561lqa; Mon, 29 Apr 2024 03:37:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCBFwm6k901A9Xnf6mWD2QIh5wPB+6X9//ysoXqfwIoOy4CdJYm8Wpfe2muckLlVsIQuRw+lYhMt5zUtmCG2tYA8bBsAob6Id/RYZsGQ== X-Google-Smtp-Source: AGHT+IEPQaNnaiKQm04RaQbyxoRAlgMpwvsEBlZgzhFbJiSAddbQoyv4BuhlqDBbXdnB+rmXKeyK X-Received: by 2002:a05:6e02:1aa3:b0:36c:5452:6ab5 with SMTP id l3-20020a056e021aa300b0036c54526ab5mr405201ilv.9.1714387048230; Mon, 29 Apr 2024 03:37:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714387048; cv=pass; d=google.com; s=arc-20160816; b=OjynuwkIRar/g8KZvahTTodj45lgXdQemGxr3VSh89nfG5XVY+Wvi7oUU4B8gYaw+6 hkS2DU9xXQqwdvMpluV5wPEPl0ScItXDQ+P/FUVSn0ZATqV04Fqz70zlQf9C9XaMERjX 9iv5ZzZ326Pudvr5JKiP447UVWfUWypjmB1CfTtvJ9NydaWzSCXDdhnjx5+AlG7iTAFl TLtMXFsZBArL3w5xSTPx7KTp23xghoNrPfGC2R9h5Vl0aiDGERbaArw6D9Qdhgt9a+YK VTn9bWzqlL3uSK058WA3RYZeWEOwoyxQPKRX1y8slQgjetJoqR408I0zi/Ehq9hcxv/s jgVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=dLJfLm6QSven/Kk0xr1PvysR3nscl1fg/cBxpNWoFzo=; fh=9xlVfU6l1eaRMALSOTbrulKFFu6LW6R2I2OsjpORYlM=; b=p3a1YJIgTKO78vz23bAE8zodYAAol+5vMdSKq7Avw2s/8F6GdqkXmqnZZWu6UvyC11 PvH5kOc2aT8DPSvtj+sAGqcv1PyyfY6vvrM5vJUPaF47+26+Hjwrw1Zsnkhd9WJ22lMa vFlXmYfoxyaAewa7QEwkLm0srBh9vRn3b4hgHvKTZK//UqWOv0AfRh0+n/JOygYQ+AX0 YULA9xjSMaZFCGxZl0YnZ/AGwyRJsGAMmvsvgj884YgTnVP97EMLfWdKAH0/7wJodJrA R1VsqcMmS7RQUDo0T/6RmMYcF+/f1pm+UioJ/y/86yha/FMgdg/gtBdReGcbxPvM5xSw /HNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=ArUfwr12; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-162068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s10-20020a63770a000000b005f7d91e7e93si18174650pgc.646.2024.04.29.03.37.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 03:37:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=ArUfwr12; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-162068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.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 CE05C281C50 for ; Mon, 29 Apr 2024 10:37:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2152147F5F; Mon, 29 Apr 2024 10:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="ArUfwr12" Received: from out0-202.mail.aliyun.com (out0-202.mail.aliyun.com [140.205.0.202]) (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 152F639AC3; Mon, 29 Apr 2024 10:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714386964; cv=none; b=SqzLdrzNx+zF6qyHQWYY6ajx55p14yy8KIbkP94+l/7uY+w/ejfJLrP8oMAkSf0+muxt/H16dqfw8Dqq4PIIlHjNuIbau+RQ1gx+jybJuYVknRuiSRQVt5DdnLkUCPizwo+OeTs8FxL0Z9Vq7XBWVS4sPtKQy2Bl5gljO0YD7Lc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714386964; c=relaxed/simple; bh=h2xeHWWYBwglEX+x9qdisO8pVjvAPSpXhXhaDjkMQHU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HrabMBivSh0C1K7P7nbcM1th8wYP+Xe40IdzFteo2BARSxZLeULskqqU8tBL4QPmxFI82neNEKWha/HBZeimQk+6GYNB7gF2hIbn7uBbkt2mJoto32hOU1kEU20jJCi4tG+bmskDIrzQQ7T/8UC+nXBuPR2x1qymXRdmSOkzuio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=ArUfwr12; arc=none smtp.client-ip=140.205.0.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1714386952; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=dLJfLm6QSven/Kk0xr1PvysR3nscl1fg/cBxpNWoFzo=; b=ArUfwr12m/13gjqdD/r0ZIsihv3TfM1SvtZhKzqB8oLUrgM+MhPWy/epJvVljTPbBazl7oTiWTXQVTASw8ZDs4B82BAUPaAsWC3jAAeNySLZoftkYm60t2tl5sDU/DG+1dp9xRsRyP2joXspahbGuXrjsXOgzYSdV0nJP74C7bw= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047192;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---.XOFewr4_1714386949; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XOFewr4_1714386949) by smtp.aliyun-inc.com; Mon, 29 Apr 2024 18:35:50 +0800 From: "Bang Li" To: akpm@linux-foundation.org, chenhuacai@kernel.org, tsbogend@alpha.franken.de, paul.walmsley@sifive.com, palmer@dabbelt.com, chris@zankel.net, jcmvbkbc@gmail.com Cc: , , , , , , , , , "Bang Li" Subject: [PATCH v1 0/5] Add update_mmu_tlb_range() to simplify code Date: Mon, 29 Apr 2024 18:33:41 +0800 Message-Id: <20240429103346.59115-1-libang.li@antgroup.com> X-Mailer: git-send-email 2.19.1.6.gb485710b Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series of commits mainly adds the update_mmu_tlb_range() to batch update tlb in an address range. After the commit 19eaf44954df ("mm: thp: support allocation of anonymous multi-size THP"), We may need to batch update tlb of a certain address range by calling update_mmu_tlb() in a loop. Using the update_mmu_tlb_range(), we can simplify the code and possibly reduce the execution of some unnecessary code in some architectures. Bang Li (5): LoongArch: Add update_mmu_tlb_range() mips: Add update_mmu_tlb_range() riscv: Add update_mmu_tlb_range() xtensa: Add update_mmu_tlb_range() mm: Add update_mmu_tlb_range() arch/loongarch/include/asm/pgtable.h | 2 ++ arch/mips/include/asm/pgtable.h | 2 ++ arch/riscv/include/asm/pgtable.h | 2 ++ arch/xtensa/include/asm/pgtable.h | 2 ++ arch/xtensa/mm/tlb.c | 6 ++++++ include/linux/pgtable.h | 5 +++++ mm/memory.c | 4 +--- 7 files changed, 20 insertions(+), 3 deletions(-) -- 2.19.1.6.gb485710b