Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2883767lqp; Mon, 25 Mar 2024 11:57:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDFFx2fUaCHJjhrXKqvrLZT3waxH+Asl7eLwymvQXDpjCL2rhiNvzpPKlbliVJbkg524JGB0+bAMAWL9vDTr6PR88gxZeqehDmBXccYQ== X-Google-Smtp-Source: AGHT+IG2GpcDNkJPuYH0SaMjJLRaocm22TsYwGNsT5INOfFbp3YGODOgV7ecP3ZINJ5NyiAZ1QBQ X-Received: by 2002:a2e:985a:0:b0:2d3:5020:17e5 with SMTP id e26-20020a2e985a000000b002d3502017e5mr5950026ljj.36.1711393023492; Mon, 25 Mar 2024 11:57:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711393023; cv=pass; d=google.com; s=arc-20160816; b=Ad9GdJlJPBXIA4y1VQjlmq3IJef1cnUNvNF9RJaJpwA3be9YUKPZjSBirL0CIKnWWn wdaLJAnAxNA42okizJUSNha276CVaXKrap2vz7/X4mtdtlaklLj0xjdg9jR1qEscJf7J yNjyiqByReSnLPwKOVNJsapxuVn3yldvxSTDfhjeKG6MhD0pUTDMijheSBRARizeCy8P gfOu30mfEGz8PEPMmEsz8uawURx1rDCdBrZTKofxpgBAuUYgCO+2Y1AFyF7JbzhbZw30 GuwFjYrV8pk54gLOscn01Rz+Ku5SFS3Ofgm1kSMpeGc7HyYp24liOCPt38bKkeNbO0pK bb8A== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=3sIb1HoAhmHvLODu/AKdrc4JD1AkmvAmfT71EXdaP8M=; fh=kjjGNxEwEHyEAH+DhPiw8SeV+yCWV3dFFPg3J0pSCVk=; b=jz7dMoLoMDZ4C/QZnRhqiEkXvFObE7F9VLd2eykt70w2G5LyYZPL4YRRan4sM7AVX/ e88r7IMrU9F7SUiqiDArs1nvaFbv6FhjCOxUk5mfFcEm9ZbUVVYZrOC8R+Xf23LoMnaP 68/9igKiJKqav62YXr0LtYP9YouA0VnAjKSqCxmhhW7ZM8x0mZR3qYAVkeZ88CSnvThR b8q2B2/szukgM4Yd1G/pRfWzWQE0kn9ALrF83SSxUhexVGE17uk1uBfR+lxbWDDa8owR opkdJJvojF1ScGeePl7g/5XV0ycUpDO1sS6MYTh4mAtsjqrR18R8OahVZCTyew8uSjag eLmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=Q9g5y6xu; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-117750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117750-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r17-20020a170906705100b00a4a3c6d2c7bsi721902ejj.967.2024.03.25.11.57.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 11:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=Q9g5y6xu; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-117750-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117750-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 268DE1FA0C36 for ; Mon, 25 Mar 2024 18:54:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B4EC4437; Mon, 25 Mar 2024 18:53:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Q9g5y6xu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9E98528EB for ; Mon, 25 Mar 2024 18:53:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711392791; cv=none; b=gAKwa/AufRSBraWVmJqHS4g6fezys+BWwH9pmJWatQRsL/Nsaj5Jt7iAKznoqRaHbKnWxh4BSCVqmTHp6wxta6ricIrnA9IumquF7ICJ5EHdPt580neKWjY7wTAurWFJkbT53Jb5u3uJemYSiGBhzGzEeY+EJ4GMUZ7bzCbLbDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711392791; c=relaxed/simple; bh=hR9UJe32aZ/pMA7yh2LGZsAJ2lJT5ALVWGf+CC7hfDo=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=ZqV7/hBGCgZ2WavZClDvs5vXZe+0RyX9nlCAOWJw5A3oBWfZ8Q3gk6w16YNZOKeiv8PKjrofkJxmbrsl5mxwEfAMwkvoMhE3GwE/GczC2SsASQLHXc0KNeGqTIHDIGp+BgsPN3xkFlBWMlo+OsiOjSoh+nNKqsGry1i/LJTMxM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=Q9g5y6xu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68596C43394; Mon, 25 Mar 2024 18:53:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1711392789; bh=hR9UJe32aZ/pMA7yh2LGZsAJ2lJT5ALVWGf+CC7hfDo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Q9g5y6xuMwEftgqfh1bq3/Ph3Ud+vrX5q4vxSmJDvBvTl7EZl5EKO4aQ67VzxtVl7 1B1mxve0S8vb3y68vHymsitx0gVaBrBWktwohEk+HPZ5yNLewQjTj0aVn1ZIQlaK1e yH6Qw5PxoX7Ff8ubgyN7r3+1AptaDdqP66jWQu0Q= Date: Mon, 25 Mar 2024 11:53:08 -0700 From: Andrew Morton To: Yajun Deng Cc: Liam.Howlett@oracle.com, vbabka@suse.cz, lstoakes@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Helge Deller Subject: Re: [PATCH v2 RESEND] mm/mmap: convert all mas except mas_detach to vma iterator Message-Id: <20240325115308.f6344233a27f1633f642f888@linux-foundation.org> In-Reply-To: <20240325063258.1437618-1-yajun.deng@linux.dev> References: <20240325063258.1437618-1-yajun.deng@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Mon, 25 Mar 2024 14:32:58 +0800 Yajun Deng wrote: > There are two types of iterators mas and vmi in the current code. If the > maple tree comes from the mm structure, we can use the vma iterator. Avoid > using mas directly as possible. > > Keep using mas for the mt_detach tree, since it doesn't come from the mm > structure. > > Remove as many uses of mas as possible, but we will still have a few that > must be passed through in unmap_vmas() and free_pgtables(). > > Also introduce vma_iter_reset, vma_iter_{prev, next}_range_limit and > vma_iter_area_{lowest, highest} helper functions for using the vma > interator. > I assume Liam's earlier request still applies? : Helge, : : Yajun has changed code that affects parisc with this patch, which hasn't : been tested. : : ... : : Can you make sure that the expand_upwards() still functions on parisc?