Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2264895pxm; Fri, 4 Mar 2022 12:39:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIHyPbe4ru1mMBCNiC5Icemqr35HDlOz6lphQtnDP2f3vCJ8sd4uXdaRC4SKX3Idw4UWyb X-Received: by 2002:a05:6a00:1488:b0:4f6:cd7a:aa34 with SMTP id v8-20020a056a00148800b004f6cd7aaa34mr304933pfu.62.1646426369744; Fri, 04 Mar 2022 12:39:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646426369; cv=none; d=google.com; s=arc-20160816; b=PANO+cdbTCwJteJA0CqWxrYFi8t+i2kfapenvFdGTv3/sAloR4ydDdGqqhAXi9AYKt Bn0dfGXhS/LUHO/+VRFF5CAW6VQKaigI59zCAuCXxFI70yVBd39XA42AAUTxF1lJq7vj TZchlI8NsP6TkRCDqJeOLV+P+SOStK7BT5ihut9AgZVW3Aj8WdOXeVnTrdoVNsXdOOKm gPPBTieD8N2HcHbN+tSFtMdhHtHLRLVcfqrymdfSNATv9fqDtaYJoB56eHOtaCg6KfXt RbgG0XK6teOnsawXUKWgcRQN1/SbV0v/P/n/TnZYakvFbrbbb1iOIKpoS4ceyKTfBV2V sjSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=pE+I/gRczZg4GsJx4FZniE22MNELy2Ncp1BxXucUrMg=; b=UC9Dh6tcqUwb7w+44wyDinNmGnTthuooiBM4Xwh7WzHBs7aRit5K6tO5wbac4M85uE wcyG2ZTlUi19ggqbi65DT6Ewm0FR+WK8pM0r3UXlq2p2elAAPOYKs8kRZWEa8a/xwJ+v mNsm3ubs0KNRdJBelFg83EFjUJ0GS5AQIJLYhM/7vDrRsFSBeRBkdP+f7eVOt++mRB6w gtHdGOu53IsHVJ1M6Fh6q0E4TMgcB94IsYA/8SezK7Dpzp20UxuYCdb+SR+nU1drM0ul LQh3VYehzYv8xLkTLbvGZB6nZu4hIewYA9HmLUSBV/ioE33fA2C2kZDASNO2LGTIIDy5 iMpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jc3J71VM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r23-20020a170902be1700b0014f76a17592si5449682pls.291.2022.03.04.12.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:39:29 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jc3J71VM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C8F71972AF; Fri, 4 Mar 2022 11:39:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240673AbiCDSHe (ORCPT + 99 others); Fri, 4 Mar 2022 13:07:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234941AbiCDSHc (ORCPT ); Fri, 4 Mar 2022 13:07:32 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 39D22E19 for ; Fri, 4 Mar 2022 10:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646417204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pE+I/gRczZg4GsJx4FZniE22MNELy2Ncp1BxXucUrMg=; b=Jc3J71VMfEE6lVURD4gXvv/d8wa539EnNkQETs9oKTXDl6truCmCbh/wvuGBy/q2AE74DX 0P2AkzZYaTPWDtGf6XLcVRsNSojooLAtZ/77GjAjSTEJH3MlpdBZjYluTN0rvnXLKOJOP5 DXlXEti3cB3HRe/bdboBlwm3txV+oYE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-256-gtofnjRQM-uBC5kwvzSJBA-1; Fri, 04 Mar 2022 13:06:41 -0500 X-MC-Unique: gtofnjRQM-uBC5kwvzSJBA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02B0B5200; Fri, 4 Mar 2022 18:06:40 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.59]) by smtp.corp.redhat.com (Postfix) with SMTP id 786FB106222F; Fri, 4 Mar 2022 18:06:38 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 4 Mar 2022 19:06:39 +0100 (CET) Date: Fri, 4 Mar 2022 19:06:37 +0100 From: Oleg Nesterov To: Hugh Dickins Cc: Andrew Morton , Liam Howlett , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH mmotm] mempolicy: mbind_range() set_policy() after vma_merge() Message-ID: <20220304180636.GD19636@redhat.com> References: <319e4db9-64ae-4bca-92f0-ade85d342ff@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <319e4db9-64ae-4bca-92f0-ade85d342ff@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 03/03, Hugh Dickins wrote: > > Just delete that optimization now (though it could be made conditional > on vma not having a set_policy). Also remove the "next" variable: > it turned out to be blameless, but also pointless. > > Fixes: 3964acd0dbec ("mm: mempolicy: fix mbind_range() && vma_adjust() interaction") I can't believe I ever looked at this code ;) Acked-by: Oleg Nesterov offtopic question... can't vma_replace_policy() check vm_ops && vm_ops->set_policy at the start, before mpol_dup() ? Oleg.