Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6092405rwd; Mon, 5 Jun 2023 12:57:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5VlY4dFtBExkz7W9oBmY8Z/vFoME9KuTz6JayUe19Lz5eLMGOwG0iawbv1qvi1Mbqk6Fl/ X-Received: by 2002:a05:620a:271a:b0:75e:4492:740e with SMTP id b26-20020a05620a271a00b0075e4492740emr929468qkp.33.1685995024960; Mon, 05 Jun 2023 12:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685995024; cv=none; d=google.com; s=arc-20160816; b=ridzpCiM6EgxPIyi2G40RJNsRLbahAW0RDp0gvfhOZuC60LGfBCWMF44dxj4cdUjsW DK/iAHTFnTqpsoilM9Mff+I0cWWUoS0N66FoxQ7rV6fwUjdghmhJt8EFabIHdKO9bNpW fk7bsxD5N8RJJzRDu8dLkVnYjdpP9lsJI8DokjFjzyDPOX/C1R8OqMkBOAidaAdS7dac OwCZL+pX5olx9GRctZfy73Y2uZRPWE8CiBCGZhfI4m1R1T8n1t6D/nBuxeisKiJsF5zU 66OhjP3qUBj2R/fZTNagzOvnGPoPZ7BSUXxFfS1fjZsJBHLAwapqPabqUF5rExKePa0B d0OA== 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=JoPaSgBjJj58dV7BGiXU3uSF8sQlJSVxH8VXpwcoLMw=; b=nmqJm//7Jw8IBzCaLIs5oEHpN4XjUwv0vvQx8du0Y8i20FQ70iGlGVr/cBQ2sKxAGW hKIXRGme+hZe9cf+GrbVS8mVcOe4GEXPu7LbPo6283OAOwCVtl8tKW1+mECk+Rp0wWU3 mmY5EpCVR696nqyZg+1HwqO9/STvQzrqLsD1m2nNEsJfa3wbYYzP76RUnpnRWatPiizj Y1FFvS/3FSKV/3wSP7JNTz1gtBM+VILfIGu2XbVhCY23YncmUmdrCbMb/18VRpWHReeW LtCoUOexgAIxDsqVTPV9zr2DfDNv9hllJ1ntV9vImsvNM/TjzgHFXCTI1MY2tTF4eTek N6Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UhWLSPi6; 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 h14-20020a05620a10ae00b00757a07429a7si4802933qkk.400.2023.06.05.12.56.50; Mon, 05 Jun 2023 12:57:04 -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=UhWLSPi6; 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 S229531AbjFETZh (ORCPT + 99 others); Mon, 5 Jun 2023 15:25:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbjFETZg (ORCPT ); Mon, 5 Jun 2023 15:25:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3200FEA for ; Mon, 5 Jun 2023 12:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685993095; 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=JoPaSgBjJj58dV7BGiXU3uSF8sQlJSVxH8VXpwcoLMw=; b=UhWLSPi6ymb0BfI1e/oPQpi709q1fMiyXU1ZD9pwjiiUff3CA/Gk3diykROF1XjdDtIyx3 3LqxRxy8qCS+YfcHrP0joC56bLzC4Lp7Yw7/m19mZv5d9t5Oppn4mvOh+64fm8GDdcZbcs Z5EU08R40J95SNG5E6YnHR7X9znsVPs= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-csKnSMjFMTS826mo4R3N9A-1; Mon, 05 Jun 2023 15:24:54 -0400 X-MC-Unique: csKnSMjFMTS826mo4R3N9A-1 Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-39aea2541c8so93871b6e.1 for ; Mon, 05 Jun 2023 12:24:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685993093; x=1688585093; 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=JoPaSgBjJj58dV7BGiXU3uSF8sQlJSVxH8VXpwcoLMw=; b=YBg7RslhJJjSC2KkHShoC1m0YObU7ufsMOGyLzCF15XUK5+xUWpv/tA1s1YYhS496k MoVR8ACc/MXozE6IDIZe2FDnUrhTtu+ngwD8ekVDNsgvGcvX4a2IPIYba4lC3+s5u8J+ jCdRxWQrdenXwLKNyJaXMtGpsZSIHi29y1uOdNO8jtF8GtuTrpNdg97LPYHDLB2Dtimj +c/E996V2e/w/EGWA5UZKA4Pt1yc9Xt/udMBhWZWrnOVYgHufHsnLCJxkaaPMPsc5E8f gCWgIlr2/jmDjLYezIvuI2JfpzxnC09H8W5Fn0c1f1w/qmd82W70fXdvVchv/F8/DQIY GxhQ== X-Gm-Message-State: AC+VfDzxpG1FzjmeR9QPh6IUr93hAqwz4n7iA4nIGIW/n65jsE4qUD+w cnrPZaW20oMq2pW/4hNRJ1QdIQJYcUnV/5leNB5nHrHB8jNTlnav3oqNU8IetvSMKBa/SlpWZsn ZOL1KkRVLJg4djmLZFTy74dgiJZaT+nWg X-Received: by 2002:aca:a996:0:b0:39a:a954:27c4 with SMTP id s144-20020acaa996000000b0039aa95427c4mr2884853oie.3.1685993093195; Mon, 05 Jun 2023 12:24:53 -0700 (PDT) X-Received: by 2002:aca:a996:0:b0:39a:a954:27c4 with SMTP id s144-20020acaa996000000b0039aa95427c4mr2884838oie.3.1685993092878; Mon, 05 Jun 2023 12:24:52 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id m13-20020a05621402ad00b00623839cba8csm4828284qvv.44.2023.06.05.12.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 12:24:52 -0700 (PDT) Date: Mon, 5 Jun 2023 15:24:50 -0400 From: Peter Xu To: John Hubbard Cc: Andrew Morton , David Hildenbrand , Shuah Khan , Nathan Chancellor , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML Subject: Re: [PATCH v2 10/11] selftests/mm: move uffd* routines from vm_util.c to uffd-common.c Message-ID: References: <20230603021558.95299-1-jhubbard@nvidia.com> <20230603021558.95299-11-jhubbard@nvidia.com> <64e21a2c-1bbe-4ab6-e67a-29b2d1d1978e@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <64e21a2c-1bbe-4ab6-e67a-29b2d1d1978e@nvidia.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_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 Mon, Jun 05, 2023 at 12:09:56PM -0700, John Hubbard wrote: > On 6/5/23 08:59, Peter Xu wrote: > ... > > > -$(OUTPUT)/uffd-stress: uffd-common.c > > > -$(OUTPUT)/uffd-unit-tests: uffd-common.c > > > +$(OUTPUT)/uffd-stress: uffd-common.c > > > +$(OUTPUT)/uffd-unit-tests: uffd-common.c > > > +$(OUTPUT)/hugepage-mremap: uffd-common.c > > > +$(OUTPUT)/write_to_hugetlbfs: uffd-common.c > > > +$(OUTPUT)/ksm_functional_tests: uffd-common.c > > > > Sorry, John, I still cannot follow.. > > > > As I said before uffd-common.[ch] was for uffd stress/unit tests. I > > confess my fault to not have named it uffd-test-common.[ch] already. > > Actually, given that there is nothing *except* test code in this > directory, I think your original choice of file names is just right. > > > > > I think it's fine to keep uffd_*() helpers in vm_util.[ch] for now, until > > it grows. Just like if one day we'll have a pagemap.c test we don't > > necessary need to move pagemap_*() helpers from vm_utils.[ch] into > > pagemap.[ch]. It just keeps common test helpers. > > > > Can we avoid linking those into other tests in whatever way? Maybe > > renaming it to uffd-test-common.[ch] may be cleaner? > > > > It sounds like you are suggesting this: > > $(OUTPUT)/uffd-stress: uffd-common.c uffd-test-common.c > $(OUTPUT)/uffd-unit-tests: uffd-common.c uffd-test-common.c > $(OUTPUT)/hugepage-mremap: uffd-test-common.c > $(OUTPUT)/write_to_hugetlbfs: uffd-test-common.c > $(OUTPUT)/ksm_functional_tests: uffd-test-common.c > > ...approximately. Do I have that correct? I can arrange it that way > if you feel it's a better end result. (And it's better than leaving > uffd*() helpers in vm_utils, imho.) Yes, as long as we don't link (especially) the uffd test specific globals into non-uffd test programs I'll have no issue. Thanks. -- Peter Xu