Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4715105rdb; Tue, 12 Dec 2023 07:27:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHq3KQzV9NHwkBMwGXrenaStiHl7H81dHnFDxrDc6+QFP9ujflQD5K/xGM5ZHYEz85LTiRR X-Received: by 2002:a05:6a20:560c:b0:190:4daf:70bc with SMTP id ir12-20020a056a20560c00b001904daf70bcmr3201648pzc.108.1702394853000; Tue, 12 Dec 2023 07:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702394852; cv=none; d=google.com; s=arc-20160816; b=dhZA8PrwBPxQYP8jCtiMBL/3BeQ+5RW1Y9Ecg2cgcYhLCJJU7/dAiCbRDL963Mqk6m lChNjM6qv4aGTJE5pgJgB23Y21GV9euhPK9apkV2rkL38GDnkKuqNx+15EdRUFSvT+ST IwdqaeIMaDbJJiTXU1SvJGiiamOfZUGoWMi61L9RHGGZVeiF2niqDpj7Ifx5dIT7NCft 1i+u1yq4v8OP0bQwN0XTVn1Y/DtLa8G2GfhrITxFUy8yZ+Lw9ApOZ/Xz6zQ8M20YAncp cCBMdz8abEstHqOAIoDPPSZDnNJ6mucB0xqVjZW6P5pBGukMLAU0umJAEUNYmEcSDyRm cLEg== 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 :organization:autocrypt:from:content-language:references:cc:to :subject:user-agent:mime-version:date:message-id:dkim-signature; bh=T3dMiL5LvMWqoHBj+yfJcaK2PIbsFzEoAWHSJdbBQUk=; fh=YUP8TJ5/Ba0EAWCGzRHKq/Z80kKySoKdVJryPZ2rYZw=; b=PKFcrjBQs3XnGrHNWgoIej29Bf11IPJaneb04OEUYwHCvB4vTxNUk+AxMgTRRYy1eF 8bIp7ni3Uj3hMw9133rK4GHaRG90SYk7etAqjKtXlyemBEEDfpInNZoyFKHULIFIwuRu S/rxATgQ6vFH/zePaG2luUYJmvMqI77fKd84wMT/5fGIthOLNKvoHeSeVro+VTUC5Et1 il8CKktAQMJMOAyLyG0o6E+fKgHu04U0b5175u+7M4z2I2lnSkA1embAbhwlpY2RjKUP Bw2DuXuNxuWxrSmfrW4QgKeztcvd0abbHI8M6EQukV8rNIWx35S1mS9AtyCpixVJFa/j 22Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a+S5z1qL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w6-20020a056a0014c600b006cb6338dd60si8076553pfu.19.2023.12.12.07.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 07:27:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a+S5z1qL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D67A6804B01D; Tue, 12 Dec 2023 07:27:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376792AbjLLP1S (ORCPT + 99 others); Tue, 12 Dec 2023 10:27:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235093AbjLLP1M (ORCPT ); Tue, 12 Dec 2023 10:27:12 -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 ESMTPS id 1F04B10B for ; Tue, 12 Dec 2023 07:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702394837; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=T3dMiL5LvMWqoHBj+yfJcaK2PIbsFzEoAWHSJdbBQUk=; b=a+S5z1qLvkfJCWgLxm3h8RUOoHWKfnSf33QxFeIFlEb7DVpmFcENzxyaO4vOWCDtSJy7iS Qmvrot11DYoYAlXWy8LyO5vGGg+uGkSxpr1dRq+1RgoIro+oyBUDbz8/J+g4CWqdgGLGYg ek7KQ8dtxiFVfzdE1dXucIeD9JawMps= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-316-ZsqMJyc6Pj2I_t2qKboa_g-1; Tue, 12 Dec 2023 10:27:15 -0500 X-MC-Unique: ZsqMJyc6Pj2I_t2qKboa_g-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40c49cb08fcso14131855e9.2 for ; Tue, 12 Dec 2023 07:27:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702394834; x=1702999634; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=T3dMiL5LvMWqoHBj+yfJcaK2PIbsFzEoAWHSJdbBQUk=; b=Qszj6tws/4AdcD/p0igC+Y0TPnYdmpcF5NzSP/aUfgmQgYvWnRdMNFTA7IVdgjEPAP vTFSSUyu5D67xFkmZWaoI9h5CDj4L4EEssdAxkh27VKi/vFBdxXtFEBanKIWbwgo3HJR eA51DGH8FzqhXM6EHl9fHDVA0qB4kt3+2b4YII+nDY++HXUzuVPZxdhoOoR+DBMuKPJS DXuTV5hGIEJ9e/7UMpVX6BSjH2zLhpuL6eGWNRB0j49nO3m1szYMprS8VfqzvPE/yDWZ fx12DuBVuMuYdk4gPECgJmr/Jp81C5AM/3qrBhgDefv3olbCMCyRYJTMH422X6XjyHUn Bmew== X-Gm-Message-State: AOJu0YyFGrF26Ea9BlHevxnVgUva9wQO4bS7eM5/GuSs2m/G+ww/Je6f WKLgYRSRDd0UiEPr3rr1vNFvOOPh8ss6a1PnKvbJJq0p+N61FODYrZF2ngFM8pjzCuxhX3sGG5P mRM3HZW0BQI/9H8+B+M5XOl55 X-Received: by 2002:a05:600c:458c:b0:40b:5e21:d355 with SMTP id r12-20020a05600c458c00b0040b5e21d355mr3324529wmo.94.1702394834601; Tue, 12 Dec 2023 07:27:14 -0800 (PST) X-Received: by 2002:a05:600c:458c:b0:40b:5e21:d355 with SMTP id r12-20020a05600c458c00b0040b5e21d355mr3324508wmo.94.1702394834131; Tue, 12 Dec 2023 07:27:14 -0800 (PST) Received: from ?IPV6:2003:cb:c74b:ca00:4ca2:ff2c:9092:f070? (p200300cbc74bca004ca2ff2c9092f070.dip0.t-ipconnect.de. [2003:cb:c74b:ca00:4ca2:ff2c:9092:f070]) by smtp.gmail.com with ESMTPSA id h2-20020a05600c350200b0040c44b4a282sm9088185wmq.43.2023.12.12.07.27.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Dec 2023 07:27:13 -0800 (PST) Message-ID: Date: Tue, 12 Dec 2023 16:27:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 5/5] selftests/mm: add UFFDIO_MOVE ioctl test To: John Hubbard , Mark Brown Cc: Suren Baghdasaryan , akpm@linux-foundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, lokeshgidra@google.com, peterx@redhat.com, ryan.roberts@arm.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, Peter Zijlstra References: <50385948-5eb4-47ea-87f8-add4265933d6@redhat.com> <6a34b0c9-e084-4928-b239-7af01c8d4479@sirena.org.uk> <3240f4b5-081b-4075-851a-7d1cd86f4333@redhat.com> <1368c558-c58c-4574-907e-36b07dee31bb@sirena.org.uk> <6ee5d68a-fa54-4ed6-bc41-2bff0d9eb12f@redhat.com> <052dc756-cc05-4aa8-9724-14d42853089c@sirena.org.uk> <8a2ce635-58f4-44e1-a646-6527936c5836@redhat.com> <400c0342-bb28-4dd2-b132-9927c7babec4@sirena.org.uk> Content-Language: en-US From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E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0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 07:27:31 -0800 (PST) On 11.12.23 21:11, John Hubbard wrote: > On 12/11/23 12:01, Mark Brown wrote: >> On Mon, Dec 11, 2023 at 07:00:32PM +0100, David Hildenbrand wrote: >>> On 11.12.23 18:32, Mark Brown wrote: >>>> On Mon, Dec 11, 2023 at 05:53:59PM +0100, David Hildenbrand wrote: >> >>>>> https://lkml.kernel.org/r/20231209020144.244759-1-jhubbard@nvidia.com >> >>>> I mean, I guess people who don't want to install the headers are just >>>> not going to be able to build a bunch of tests? There definitely are a >>>> bunch of tests where it's not needed so I can see why people would not >>>> like being forced to do the headers step if they're only interested in >>>> those tests. >> >>> Yes. And before that, people mostly had no clue that headers had to be >>> installed in order to compile successfully. >> >>> So maybe a warning to give at least some hint might be reasonable. >> >> That sounds sensible, especially if we could arrange to flag when the >> specific tests being built need it. > > > But the end result is messy: not everything builds in some cases. If > instead we went back to the little ifdef snippets, such as this (from > v5.1): > > hugepage-shm.c: > > #ifndef SHM_HUGETLB > #define SHM_HUGETLB 04000 > #endif > > ...then with a bit of one-time, manual effort, we could get everything > to work at all times. And that seems better, doesn't it? I'm not a fan of fixing up host headers on a case-per-case basis using ifdefs. It makes the tests harder to read, write and maintain. We do have the proper headers in the tree, just not in an consumable way for the tests. Ideally, we'd either carry our own "consumable" version in the tree, or are able to convert the headers under the hood and place them in a directory where we won't have to dirty the tree -- and only tests that need these headers (e.g., mm selftests) will perform that conversion and include them. I usually build my stuff in-tree, so I don't really have a lot of experience with out-of-tree selftest builds and the whole kernel header inclusion (and how we could avoid the "make headers" and place the headers somewhere else). -- Cheers, David / dhildenb