Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8421436rwd; Tue, 20 Jun 2023 15:10:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59x508HxYKQY+II5N1NXqbyJeBsYthbGjrv3b+o5tBR9HQMlTKSe0R8ZDkBZuGlfRFhb3O X-Received: by 2002:a17:902:d48b:b0:1b5:642e:139d with SMTP id c11-20020a170902d48b00b001b5642e139dmr7286949plg.10.1687299028624; Tue, 20 Jun 2023 15:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687299028; cv=none; d=google.com; s=arc-20160816; b=dm3N8iD+5kUM/E9+U10YhODBlGdzKTi0ow+2br6sM2naQjbYrYhGtwDknrsZallzmy WiHXFbkjw6lj1BGltiNVy1X+yHK+oc8lbE4dc9nW6jOO6A+ulvhvLtxFNHhPhS//Xr1W ymOpGiclW8clvBWqhkoiCAPteazNITzVBeVYf1pCOkHTtD24nm+ycUewkTsJd2e1kYVT T/Tn9XwsJBu7lf5TjItAO9OBP4Mjnmkn2qvBFVWrfZPaby9Ac/37L67Ua3N98jtYh+Sd bKoJPp0zgfDZ6WeQMuhYKMuz8r8EG1TrrmpxKYGnvlMy0s6+pNi6abbGEQSCRM+l9ZzZ Zjbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=5jcP/rm05RrInHETkeFjW0Eo/JiIhtFou4XrWSAd+wQ=; b=yqgRa/ae9w0GtR3MxOZE5aBJczWfJIXlDW0HByjEcVCYQtdDISLL3AFfUEzFuSAoCn lmwQq0+ewwHLqdGizituaSLOmlSK7LvFiAoG0ddCiKy0anfrPsxFpcVC58FoXTInJERY 5tlhmt5bcV0AGg8RFCzJCLpNhkdNhzD5Uh3ONi2zL9MsR3xrQcjOzJesHu5RS1Fnrb+S VJyrFnHapjjO7Tn1hkteK7Fcn+6UvTSBdmcSbErm3jZUvVMy3lJd0zCKoqQZOGASa7bV WunECaslw7a0diJ+/EuVdD3o479Xf9R8O+9gfIjuyLI6IybG2Yj1DTN8nOT63R/Z6hqj cIuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=xVQxFtvI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r19-20020a170902c7d300b001b07c3c3206si2564386pla.265.2023.06.20.15.10.15; Tue, 20 Jun 2023 15:10:28 -0700 (PDT) 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=@joelfernandes.org header.s=google header.b=xVQxFtvI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229624AbjFTVVP (ORCPT + 99 others); Tue, 20 Jun 2023 17:21:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbjFTVVO (ORCPT ); Tue, 20 Jun 2023 17:21:14 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F7E6132 for ; Tue, 20 Jun 2023 14:21:13 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-763bd31d223so26861485a.3 for ; Tue, 20 Jun 2023 14:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1687296072; x=1689888072; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5jcP/rm05RrInHETkeFjW0Eo/JiIhtFou4XrWSAd+wQ=; b=xVQxFtvINCiFD58bFiHYe1aaNqyDHDsRvXUtLyBCZQ4OLf5LG+wj4dz9IJT7bARDm8 bndpbFIdIVhYMIXyn2vhnHPSX95zDd62o17nMugqLgSeM2YOobMUCCAS1Ip1HLcN+ESg nhyfiD/0m3FoPIOECqAJa4v472BYsAo6epunk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687296072; x=1689888072; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5jcP/rm05RrInHETkeFjW0Eo/JiIhtFou4XrWSAd+wQ=; b=l9W2Ur5ANeK7UA9/L9zmqPRluXGkkdabV3RPUgnb4+zuXIVNMoCxP0RKc11W9VsnSK +X7XALFJoFPGMMp39qAQqS0EpIQZTY9WYDgY98BVXzrxdYJgwSYG5MVz72aL+JO8t0oO lDvpQMy+XeRrHu8ZAXDqxcGnhfrrAwkvNcUx4quDrg3PTazjWTOj5HR9/tuSX2HMjcpS ASGWHobqwCp0A1j5Zn/guUyy7uVpd2pO8jAiAiDjwS3EVc79yXjhkhK95SVQS6WKTJfh Jsxgd2YjPGtEaUbSbpBsVPMgpihO/Uj+ud/hQI9TyCVBNSJnaTOQjPcZWwQT+Pv3Pc4m FNbw== X-Gm-Message-State: AC+VfDzrzLiJ9c3iOrflD3JkPqkecuAvljSH3MiWm7Fr64OW5wMIRzBF z9gAeWh3NEd3in1AwMeG6K4XQEHImy5vq+vGx9M= X-Received: by 2002:a05:620a:660a:b0:762:3a20:7719 with SMTP id qf10-20020a05620a660a00b007623a207719mr12345317qkn.18.1687296072551; Tue, 20 Jun 2023 14:21:12 -0700 (PDT) Received: from [192.168.0.140] (c-98-249-43-138.hsd1.va.comcast.net. [98.249.43.138]) by smtp.gmail.com with ESMTPSA id l2-20020a37f502000000b0076087149a19sm1512897qkk.83.2023.06.20.14.21.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 14:21:11 -0700 (PDT) Message-ID: <867bd9d6-1d00-0d9d-368a-8224cb40a505@joelfernandes.org> Date: Tue, 20 Jun 2023 17:21:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 1/7] mm/mremap: Optimize the start addresses in move_page_tables() Content-Language: en-US From: Joel Fernandes To: Lorenzo Stoakes Cc: linux-kernel@vger.kernel.org, Linus Torvalds , linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Shuah Khan , Vlastimil Babka , Michal Hocko , Kirill A Shutemov , "Liam R. Howlett" , "Paul E. McKenney" , Suren Baghdasaryan , Kalesh Singh , Lokesh Gidra , Vineeth Pillai References: <20230531220807.2048037-1-joel@joelfernandes.org> <20230531220807.2048037-2-joel@joelfernandes.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 6/20/23 17:16, Joel Fernandes wrote: > > Considering our discussion above that hugetlb mremap addresses should always > starts at a PMD boundary, maybe I can just add a warning to the if() like so to > detect any potential? > >     if (is_vm_hugetlb_page(vma)) { >         WARN_ON_ONCE(old_addr - old_end != len); Oops, I meant WARN_ON_ONCE(old_end - old_addr != len); to make sure we did not mess up hugetlb mremaps. thanks, - Joel