Received: by 2002:a05:7412:85a1:b0:e2:908c:2ebd with SMTP id n33csp73961rdh; Mon, 30 Oct 2023 14:22:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElRUJ4rGkoPhD0q4Ab/HxrLCgJFEPTjIy4b/bFhmQ7E54IhqBwFu09bhpad6ZgEQ3aP8IZ X-Received: by 2002:a05:6a21:4887:b0:17e:8960:659b with SMTP id av7-20020a056a21488700b0017e8960659bmr8564978pzc.26.1698700969917; Mon, 30 Oct 2023 14:22:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698700969; cv=none; d=google.com; s=arc-20160816; b=rVqmpH74Z99/5xP9D3iMNuV+EKAkYpHN05EjuuQa6pkw8lub0Qf8cafNSoifqMVscK +Bo2jW+KvAH84iutWTT2vIspUVF+RUum3dXqyA5CL42p3c7HXuSkaZUxylVO55CSOqqJ VZQ2CVGM3EOgfnCRCSpjtoLkNyqk8f3GMxquOgXAFZjTpCsI0KFR8/+QCk8RhiSQbpc2 v5YwXhdOEMZwRSDfc5oI3uaKU7oNV3xP4g5PLFZPCY186BKjNa6ygHKOODgSTx4R8eM+ obBuSbn1zTxzrqzUQ0eU8TaPiihFTs5N0GcSyutbQZTGKIoQxFbg3M6MTRcdPnKAogy8 i4sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=uwJPbkzTcW2a0Aake5KdIVl2hETAF8IjmbwWVJSuVUw=; fh=4OSpxeiBwsuIzSsgUf+PjxsJgx9x8GY3HkIgnmcCqx8=; b=OxPpePDTE5jfpJCyTMpAUd6mpHOTjiSRodFAqQMkntzi3R3+X78sRh2P/Ebj2+axF6 8m0/q4WfwL2IYcT4eawK8y1phyqiXGv9hddbNabyNycyo10I88zGPzNyVWdzaPfe/8Zb ra0PXyO++9Ur+WfH+VyOvGbcTcwCk0TqDELPqtQRYGuUhSPZNZq2KhH1VCtWOy8E6huz l9X6IJJ9JyZDI/3QUMAz6Hw9yXpz03hWQ6wo+UaFS/LLpJNrF9JY4jbwliTgEAKeCNbH M4USaiAuNO/bQvkkqWCXk7IMT2kRrPd2MufRCCtVpJC8r+Ozm8/DgPO3ZzINu5F1zyBq yHJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Wx0iAWYl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y4-20020aa79e04000000b006bc18937f9bsi5461898pfq.15.2023.10.30.14.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 14:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Wx0iAWYl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4A66A80AC59F; Mon, 30 Oct 2023 14:22:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231936AbjJ3VWf (ORCPT + 99 others); Mon, 30 Oct 2023 17:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231871AbjJ3VWd (ORCPT ); Mon, 30 Oct 2023 17:22:33 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE6DF7 for ; Mon, 30 Oct 2023 14:22:30 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-d9c7bba32beso4478666276.1 for ; Mon, 30 Oct 2023 14:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698700949; x=1699305749; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=uwJPbkzTcW2a0Aake5KdIVl2hETAF8IjmbwWVJSuVUw=; b=Wx0iAWYlcDRAmwXfeDu1TIGeyf2a03/2CWVPGcQioNB/aaFiWvz90T94M4WYfoSqrU 9QZTpRC1AIUhUVYs5J+/SWqyFtsNFOKoiJTst5mrlSU8qxE1g2rqaj00RVNjxl+JsvA9 n4UggqZSccmnxcq4kY37ADju4VGy8Riww0zPhxRBiQMopa2XY7VuSQc3N09+ta/C5SRY 5HYLouNCHser50Vzw8S8awr8qREytcoKY9jpytWQUoCKGvyckPtCt3NxNxZGMdCMtDr7 56Szab0mLt3wDKsI9cjAWD5s8j29ZtyuAXwR9/tdnWWgaNNyr1nm2sJvnQ+3K5FAZWye Pc8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698700949; x=1699305749; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uwJPbkzTcW2a0Aake5KdIVl2hETAF8IjmbwWVJSuVUw=; b=hnKABMtiNphW1IdslCqcjtp55wDUKc6wbj43lHJMwtT8DZhrzaIUE5k0vOUvm4dPaZ UwgeOIIHAY5e9+jeM1yRMaiXUSpe9HnrtnxAaP3UMwT8k+JsZTwKk6BHAms1c8nEu9Bf odKo+7vjDlMQ4WLmjPBgjPr0H814gZMU1k0SgQFQTfuF3FKrrFcDKZVEdYNWRqkCfQSw Codi7BmGHn34G0X0bMdaw/vZlFyq8sTx6WtUoNq2SVRoYH6dKqxNxHylxG6DTXV4zvnw u4KT5E9R62SPgRTkxRF+MwiBTpc4urjsOMJleqnAyPi/oCuUkh2y0KIGC4CYxmB3Ek2Y liIQ== X-Gm-Message-State: AOJu0YxKlo0HKbfmQUkTnLThUVH/8RSP8te45R2rimGyksPIL+EpqLQ1 YWBIFKLMadfzbrsor86eAL/4qi1PcIGCUI6lb6z50Q== X-Received: by 2002:a25:30d:0:b0:d15:7402:f7cd with SMTP id 13-20020a25030d000000b00d157402f7cdmr11851887ybd.27.1698700949306; Mon, 30 Oct 2023 14:22:29 -0700 (PDT) MIME-Version: 1.0 References: <20231028003819.652322-1-surenb@google.com> <20231028003819.652322-6-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Mon, 30 Oct 2023 14:22:15 -0700 Message-ID: Subject: Re: [PATCH v4 5/5] selftests/mm: add UFFDIO_MOVE ioctl test To: Peter Xu Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, lokeshgidra@google.com, david@redhat.com, hughd@google.com, mhocko@suse.com, axelrasmussen@google.com, rppt@kernel.org, willy@infradead.org, Liam.Howlett@oracle.com, jannh@google.com, zhangpeng362@huawei.com, bgeffon@google.com, kaleshsingh@google.com, ngeoffray@google.com, jdduke@google.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 30 Oct 2023 14:22:47 -0700 (PDT) On Mon, Oct 30, 2023 at 1:35=E2=80=AFPM Peter Xu wrote: > > On Mon, Oct 30, 2023 at 01:22:02PM -0700, Suren Baghdasaryan wrote: > > > > +static int adjust_page_size(void) > > > > +{ > > > > + page_size =3D default_huge_page_size(); > > > > > > This is hacky too, currently page_size is the real page_size backing = the > > > memory. > > > > > > To make thp test simple, maybe just add one more test to MOVE a large= chunk > > > to replace the thp test, which may contain a few thps? It also doesn= 't > > > need to be fault based. > > > > Sorry, I didn't get your suggestion. Could you please clarify? Which > > thp test are you referring to? > > The new "move-pmd" test. > > I meant maybe it makes sense to have one separate MOVE test for when one > ioctl(MOVE) covers a large range which can cover some thps. Then that wi= ll > trigger thp paths. Assuming the fault paths are already covered in the > generic "move" test. Oh, you mean I should not share uffd_move_test() between move and move-pmd test and have separate logic instead that does not rely on the page_size overrides? If so then I think that's doable. Some more code but probably cleaner. > > Thanks, > > -- > Peter Xu >