Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1564122rdh; Mon, 25 Sep 2023 17:37:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1O221EJ5tL9+95TbT6dX2ye+oP+rKUHmw+qpxAizmbj8MNlQrW5odCjU1W1rI0x9uSOdR X-Received: by 2002:a67:ebc1:0:b0:44d:453c:a838 with SMTP id y1-20020a67ebc1000000b0044d453ca838mr5219390vso.5.1695688620508; Mon, 25 Sep 2023 17:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695688620; cv=none; d=google.com; s=arc-20160816; b=alrijMi3FyvLsYpYa3ZmopPJ+SRnlTFIjYmNKxVDwa8sgFfGdast45xCItyxB1HBb8 CeRMvppzE6zEY3olg8y0Wu3Ny48AmN6DqxlprIkr0Z5sD5Gec8EFvEXKgjuQVpDAJNhL NZkOfkAzkuoFEoN1R7s7/3EJs6lchiEvWGCHStwO1k8btVfBKChnN3NoyZ65a9mZxcxh pvaqKXOyKp1kJEVhG4JsyqcJpdU5QnLP6j7JzYGeJFTjQospCqeuN7dX/OgyvspkNzwz /a2g7BDPjD6Yyz6bJOIuu/lXclVO2ltVZ3rL0OBmTGMoza9VHffh8KDyhs5m8LNrn4QA 33HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FuX7ZhPNdsEfp0dIlYaP4PSQgtbMhjdLDod/EvVvJts=; fh=Yibd+6efQ2NbloUNqjhUgqChaOBGlXVnr6VE1C45OVo=; b=zDXFeRSCw55/NP+M22vUj26ck/5Rxzz+YAjZKMUe4Pnchu5v95xZiCCzgKNLe5Lhuv jNDNj6TD5kGr9WkU5u7jEJoQdERSaGLJj46GNLK5tQukMgJ2jDKfagLqnISdvhDVrptz jRZzpfvcpT6Yb3VflqU5Wmsiuzu0zQZWYKmMvThEgueoxLJAlrzFWiO5QzUrV22JPaw5 XEg3qssyWHRJaRq3KsalFt951w239ERW7QY4V9qDQ3qMA8JhpKVpHw2dbzOU3s3EE7KW v4/JHxBuN+eDxJvPjaP+S0vO3da551wxPcFjE3+DJvDmE3cLXftdezvtbGeNi/FgmMye H2dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FQG3po5l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f20-20020a637554000000b00578b487825asi11219453pgn.208.2023.09.25.17.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 17:37:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=FQG3po5l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4C8A5808A90B; Mon, 25 Sep 2023 15:32:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232312AbjIYWcC (ORCPT + 99 others); Mon, 25 Sep 2023 18:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjIYWcA (ORCPT ); Mon, 25 Sep 2023 18:32:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79D389C for ; Mon, 25 Sep 2023 15:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FuX7ZhPNdsEfp0dIlYaP4PSQgtbMhjdLDod/EvVvJts=; b=FQG3po5l7sdfeoZyvP9SU45Ivx lcCEwkGaJpPAuy6e3Vhm5avyqWlcGtyC27leG1CA07UKWBak/ae6WfO2n8rF272f2qX4f9geeOIuc Xxs/vMs83cLU9VH1gyYgDrf1XYxGw7KO56csB1Az9aGd70jN6eLQS3C7870eUGVbm2/0GHPQ1yYqA 5fxLY12M7tcAfrjglmCZfL4QJqTy4yaf8UUNu/sOINfpLZrH8CfLO45Fa5XfQSiWZdRKdCloouAG9 vfyciH1DqP/ae5n0rGVPF3Gu3bb1yx8XLeRmU7gmJj/qB4cMgZQwi2cafwYl9eKJYXdkJ779VY1LF FKaj+dmg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qku7A-0043Gc-Pl; Mon, 25 Sep 2023 22:31:41 +0000 Date: Mon, 25 Sep 2023 23:31:40 +0100 From: Matthew Wilcox To: Hugh Dickins Cc: Andrew Morton , Andi Kleen , Christoph Lameter , Mike Kravetz , David Hildenbrand , Suren Baghdasaryan , Yang Shi , Sidhartha Kumar , Vishal Moola , Kefeng Wang , Greg Kroah-Hartman , Tejun Heo , Mel Gorman , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 06/12] mempolicy trivia: use pgoff_t in shared mempolicy tree Message-ID: References: <2d872cef-7787-a7ca-10e-9d45a64c80b4@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 25 Sep 2023 15:32:01 -0700 (PDT) On Mon, Sep 25, 2023 at 01:28:14AM -0700, Hugh Dickins wrote: > Prefer the more explicit "pgoff_t" to "unsigned long" when dealing with > a shared mempolicy tree. Delete confusing comment about pseudo mm vmas. Yes, with three quibbles > struct sp_node { > struct rb_node nd; > - unsigned long start, end; > + pgoff_t start, end; > struct mempolicy *policy; > }; > - > struct shared_policy { Did you intend to delete the blank line between these two structs? That's not our normal style. > +++ b/mm/mempolicy.c > @@ -2444,7 +2444,7 @@ bool __mpol_equal(struct mempolicy *a, struct mempolicy *b) > * reading or for writing > */ > static struct sp_node * > -sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end) > +sp_lookup(struct shared_policy *sp, pgoff_t start, pgoff_t end) While you're reformatting anyway, mind joining these two lines? > @@ -2499,7 +2499,7 @@ static void sp_insert(struct shared_policy *sp, struct sp_node *new) > > /* Find shared policy intersecting idx */ > struct mempolicy * > -mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx) > +mpol_shared_policy_lookup(struct shared_policy *sp, pgoff_t idx) Ditto