Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4768794rwl; Mon, 3 Apr 2023 09:18:09 -0700 (PDT) X-Google-Smtp-Source: AKy350YWVOO9x472e8V6E9prKxJy8ctIaQJ/yO662iYTi/7pTMtij21HTogsYZ/fmFQ42gc9of43 X-Received: by 2002:a17:906:d8d0:b0:8bf:e95c:467b with SMTP id re16-20020a170906d8d000b008bfe95c467bmr35695952ejb.63.1680538689440; Mon, 03 Apr 2023 09:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680538689; cv=none; d=google.com; s=arc-20160816; b=pj5djilxu6waax5eLcoNWsSD8cj40ItnhEu9YHFl6gVxtjexsFjcDxp1v2B9nzwuo2 qwdz95G/0RScI74JHs1TznQ+/X8ZTtNkUZx1nd5AzlOh6IZUYffKZZgenItyD+NZTeyr E+Iz+SCwkKJ5bOj9FG8h8Zch8I2sneTQrWTBBMMHESroG2+da5rYccwa6yG3XRALKUFQ UbqPqhePoaC2OYgbHzzLlEqMr7Z4paGyH2vw7jlvAEo1SFC7o25Zv5Gk4t2quAdEum5z 7phNMlb5SM567aW22bVyeAxnkZSzP8UnXJcsRA6mN75OogLKKVOU1g6j5MWjZ1IF1bjh 4EJQ== 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=V3WVVlCgDVu+so3CtUZvMFVtwTzfAtjj67XqfHbOtAk=; b=YFh58U0pRj2q+IQv1Xr0BrE2FIPBAdQaO+IPJckAHHxt4Tf06VTsezndfTP7fmdnS9 RFT+NjoZ7jkOCB3meoWsOjjJxFJFdRQ3oNeBjl4IuOq+jk1qAPvkeMLxw+fEM6xsWAcs 0Sn2hs8COXOoE8DTKd5e9FFz+oQ0MEvoVpFLsBGyCcI1lVrn2R91xv0uOGdY1hJmq12l 6DfqkUm3l4ZZD0jpISHsr/FKnk7VUuKCV2fr/+ZVlGpRmuDY9ZCBmS9kGqPzhEV/55zt eiXdrB2WmwMw3YrwixxGmkZ1GE7fD9jpbKEpXVEg2mGrT8UYYhf7DYRA0sngTwhAA2eW M3EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E6S52dVQ; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a1709063c1300b008db44ebf302si8079044ejg.133.2023.04.03.09.17.44; Mon, 03 Apr 2023 09:18:09 -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=@redhat.com header.s=mimecast20190719 header.b=E6S52dVQ; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232008AbjDCQQ4 (ORCPT + 99 others); Mon, 3 Apr 2023 12:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjDCQQx (ORCPT ); Mon, 3 Apr 2023 12:16:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B3A1725 for ; Mon, 3 Apr 2023 09:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680538566; 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=V3WVVlCgDVu+so3CtUZvMFVtwTzfAtjj67XqfHbOtAk=; b=E6S52dVQoKjnxdDXUGoABHN/kng6Quo1jHQcTyxEhawIRmH5YS9/IYDuvMVXk74VUpyRDa e0goexJUVNxwRuuhQq55uHMIic7fjAqKMngKDXT+FfD1SdzUJicQLu+vdEuyMMrtioJHZs Q8KMJWlV+DYLQWok0Ebc1S2b2xdcHNw= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-Q7PsTagSP1OkfRWsW2pHRg-1; Mon, 03 Apr 2023 12:16:05 -0400 X-MC-Unique: Q7PsTagSP1OkfRWsW2pHRg-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-3e2daffa0d4so9301731cf.0 for ; Mon, 03 Apr 2023 09:16:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680538564; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=V3WVVlCgDVu+so3CtUZvMFVtwTzfAtjj67XqfHbOtAk=; b=0l3CYaq/yWYEyncB2mKwk6TXBOzVch02tY+1CO/3NpghbHiCOVkIxvjdbEwDWAdR87 OJHjUKNjHmy43ywuY4zvptMCwejx58SB1tHocS1Kt+aeY4l1uXXCDB3eluyEpLKIujlq sLqHSWxRiIw+ryH28ysunw6r/plKL3UyY7qU2KumugyliQtOzsqRRmOyfeQmhDGEcIRO 88PleweBV9a9ZRQuMbv1Qai+6ShEnmnNKxi0R3a9M/SB0ETEJ4VAR3DoFjZOl4CdIhCo O75tRRsVumlgtrUNodzD1nRnNfvZzwGZYULJIOVs6/RxNrevi20Sqb/KMj7ZlsfBiIw0 LGxw== X-Gm-Message-State: AAQBX9c16zjfUjOjsKdzdHvsZol69ClJDcGpqFr/6MP60wsv3rxTJYaq 4J1wC9JLH2NTCkEDbj3SaFdpv2mTMAn0r0JI7aJurwRkRsJti195WqtwDMe6eB1QdCZrSergPUA RhctUd6HPBkbpk6wGPiJ3X0OvXqRmHk1d X-Received: by 2002:a05:622a:1802:b0:3e2:4280:bc58 with SMTP id t2-20020a05622a180200b003e24280bc58mr25404665qtc.3.1680538564163; Mon, 03 Apr 2023 09:16:04 -0700 (PDT) X-Received: by 2002:a05:622a:1802:b0:3e2:4280:bc58 with SMTP id t2-20020a05622a180200b003e24280bc58mr25404641qtc.3.1680538563912; Mon, 03 Apr 2023 09:16:03 -0700 (PDT) Received: from x1n (bras-base-aurron9127w-grc-40-70-52-229-124.dsl.bell.ca. [70.52.229.124]) by smtp.gmail.com with ESMTPSA id 203-20020a3707d4000000b00742a23cada8sm2854660qkh.131.2023.04.03.09.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 09:16:03 -0700 (PDT) Date: Mon, 3 Apr 2023 12:16:01 -0400 From: Peter Xu To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand , Andrew Morton , Andrea Arcangeli , Axel Rasmussen , Leonardo Bras Soares Passos , Mike Rapoport , Nadav Amit Subject: Re: [PATCH 11/29] selftests/mm: Drop test_uffdio_zeropage_eexist Message-ID: References: <20230330155707.3106228-1-peterx@redhat.com> <20230330160717.3107010-1-peterx@redhat.com> <20230401000317.GF12460@monkey> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230401000317.GF12460@monkey> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Fri, Mar 31, 2023 at 05:03:17PM -0700, Mike Kravetz wrote: > On 03/30/23 12:07, Peter Xu wrote: > > The idea was trying to flip this var in the alarm handler from time to time > > to test -EEXIST of UFFDIO_ZEROPAGE, but firstly it's only used in the > > zeropage test so probably only used once, meanwhile we passed > > "retry==false" so it'll never got tested anyway. > > > > Drop both sides so we always test UFFDIO_ZEROPAGE retries if has_zeropage > > is set (!hugetlb). > > > > One more thing to do is doing UFFDIO_REGISTER for the alias buffer too, > > because otherwise the test won't even pass! We were just lucky that this > > test never really got ran at all. > > > > Signed-off-by: Peter Xu > > --- > > tools/testing/selftests/mm/userfaultfd.c | 20 +++++++++++--------- > > 1 file changed, 11 insertions(+), 9 deletions(-) > > Thanks! With only passing "retry==false", that code is indeed dead. I had > to read the code again to understand area_dst_alias. Thanks for taking this > on as the code is difficult to understand. Yes it's very confusing. I plan to move on the cleanup to remove all these global variables at least in the unit tests, but I'll first see how this one goes. > > Reviewed-by: Mike Kravetz Thanks, -- Peter Xu