Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp26586pxm; Fri, 4 Mar 2022 15:12:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzul7m9DnrFAllbLuz6IWFKjPwLFuV+JEhrua+fwZeLlIvv2hRd2kfkBFCg9/XhjpKVQe5J X-Received: by 2002:a17:907:168f:b0:6da:b548:4f9f with SMTP id hc15-20020a170907168f00b006dab5484f9fmr854357ejc.666.1646435569708; Fri, 04 Mar 2022 15:12:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646435569; cv=none; d=google.com; s=arc-20160816; b=GCLI1umJBsS/n5OxiCV7SwW4rOwT6qcAjS/p3Lo0KlSvvanF4ssFF9i2gMnlNaV1k9 zA+cHb2XG4cA2FdUNO6Zd/4XzrbL0UJzJFHwSa2+1vV+jUzy4nD4M/vCAhxfbEZ0tl3G N7RET5Yv63ln70i22eivogouZU7OHq3nc50MCqvEsqh74An8lQguVa9QkQFBcjHNgcO8 16XsZSP+KqtFlT3KQPl4yH8ruRHJEGmMl8g4aaAJPfGyLQEt9MIp2BjG7eA2o9PCLqx7 GN+mUkY1LMtLc/aB7Q40hmo0BzjSqYXtejrcECAeRdHeKyvzNR9v7n0+TR6bs7/zpkcA HW8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=5emkd5LN3iz45QwA5eikenlMR4B/YLdOVVv/kxARc4U=; b=JRTqtMH82wk6Xj5Ad+8Ih+V/zQmRr1iD+Bi9Pog0BjgUjxytznGRkrq91AyE8t22ev GMq0Uh0jmCl+fHpoxQu+cELTQMzputzQloBhTkAm3Vem1YuQs2rGBxMH/jxvDS1rN6t8 ShX2OkQ7MwX7HO6LF/CTJconzzv/kHPdhWnU+3ceLzYAtdiMn1nIRVMnM2XqQ9uKYAP4 XSqzuzXO++9aPB0+VA/BZRDc3VsfnpUrMc1dDEy0ondHdrg00UNwUrQzOFaAjpCfirtl 73lwajzLjK4XjS1tQzw1dhH3SkQTbrv/G3G6SNZQi4es6MJj5yudXkOJXVomhbPH0idu m3eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BQJXzgwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a50becb000000b00410a0982a80si4253658edk.625.2022.03.04.15.12.27; Fri, 04 Mar 2022 15:12:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BQJXzgwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbiCDWtA (ORCPT + 99 others); Fri, 4 Mar 2022 17:49:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbiCDWtA (ORCPT ); Fri, 4 Mar 2022 17:49:00 -0500 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B4171D0D57 for ; Fri, 4 Mar 2022 14:48:11 -0800 (PST) Received: by mail-qt1-x82b.google.com with SMTP id f18so8708115qtb.3 for ; Fri, 04 Mar 2022 14:48:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=5emkd5LN3iz45QwA5eikenlMR4B/YLdOVVv/kxARc4U=; b=BQJXzgwmnmO72nx2ay7XKV3KU0f1milmJfwfFQFTWJr1NrPt1uHy6Ks0NXfgVyW1ay GLwmiTFsG8Ax5LovsNGPaVXKc9sxFLhH6g1SnfoK4k7M0nuY2CusLoGlb+8b745do1iu QkZPdIPQs+LIG55flB+pi46y10ZZ145XaDOLfhbKikHxmPMHOWMlcj7BNPV+zVSYDcfV u1Y8RDMbUYFxXYvq6kPnRWpOapGlYh9r+FA1f8O27XwkQuiuuSXEtQGEtiuA77JCRtS5 9FoHYvO36YzbwVVWQZwBoRvN5uVMZFNy8p2pMxfRlcgGh4yFH8VEHHgdZO3a5nCsbS6L vFpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=5emkd5LN3iz45QwA5eikenlMR4B/YLdOVVv/kxARc4U=; b=Nez2LpgSdrVu90pK0M1Wc/BhYkS/FNG7P1kkALg8iUC9Om719qiS13kyXDOD6Hfa1w 7FTNSis0LZDCG1dpFqYw70bsXCBFCpRLvPwo5tO6rFwNG+m7AwzjVm5RVDMm1dITBfvh KGcRfnZE0SXJBXgtKluAvua1NhAcoT/SC3GLCA4bhryjoQOT9Yls/6XqsrGUM4ibffH/ i0QBMXkqn+fAQ7KNx/OP3WCmX5A+LhbRmyIoI0qNRZpCxMHgJ5ytPo8JDTEU7GMWs2gs xGP6ev5hOJrU6qS/COp8SZnegBDdcGObbKy4Yy6WFggwiocHWNBOO3xbqVqL8z92jp6r OL3w== X-Gm-Message-State: AOAM533Pr0bMVznDWevauSbfRK+cf/abQkbLbPoaf6MdEuNH81Xc9mxW iSgUaVPZn5bKxxNT/OkSrlvUyLdOp+91oA== X-Received: by 2002:a05:622a:14c8:b0:2de:175c:fa1b with SMTP id u8-20020a05622a14c800b002de175cfa1bmr891329qtx.543.1646434090542; Fri, 04 Mar 2022 14:48:10 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id z3-20020ac87f83000000b002deae661c08sm4106469qtj.33.2022.03.04.14.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 14:48:10 -0800 (PST) Date: Fri, 4 Mar 2022 14:48:08 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Liam Howlett cc: Hugh Dickins , Andrew Morton , Oleg Nesterov , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH mmotm] mempolicy: mbind_range() set_policy() after vma_merge() In-Reply-To: <20220304190531.6giqbnnaka4xhovx@revolver> Message-ID: <6038ebc2-bc88-497d-a3f3-5936726fb023@google.com> References: <319e4db9-64ae-4bca-92f0-ade85d342ff@google.com> <20220304184927.vkq6ewn6uqtcesma@revolver> <20220304190531.6giqbnnaka4xhovx@revolver> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-18.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Mar 2022, Liam Howlett wrote: > * Liam R. Howlett [220304 13:49]: > > * Hugh Dickins [220303 23:36]: > > I just thought of something after my initial email > > How does the ->set_policy() requirement on tmpfs play out for the > mpol_equal() check earlier in that for loop? It took me a while to page all this back in (and remind myself of what is case 8) to answer that question! The answer is that the mpol_equal() check at the top of the loop is on an existing, unmodified vma; so it's right to assume that any necessary set_policy() has already been done. Whereas the mpol_equal() check being removed in this patch, is being done on a vma which may have just been extended to cover a greater range: so although the relevant set_policy() may have already been done on a part of its range, there is now another part which needs the policy applied. > > Reviewed-by: Liam R. Howlett Thank you, your review is very welcome (but mainly I Cc'ed to alert you to how I'm probably stepping on your toes a little here - sorry). Hugh