From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 592AFC25B76 for ; Tue, 11 Jun 2024 09:31:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83E7D6B0088; Tue, 11 Jun 2024 05:31:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7EE0E6B008A; Tue, 11 Jun 2024 05:31:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 640D46B008C; Tue, 11 Jun 2024 05:31:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4279B6B0088 for ; Tue, 11 Jun 2024 05:31:40 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E74DEA12BC for ; Tue, 11 Jun 2024 09:31:39 +0000 (UTC) X-FDA: 82218090318.20.D4248CC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 9B1A840004 for ; Tue, 11 Jun 2024 09:31:37 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=A3n3OzuD; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf12.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718098297; h=from:from:sender: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:dkim-signature; bh=uG737WfG6Tkr1k/786kxDcpDifeb+2U34yvKgaEkzs0=; b=vV1+p5q6rXu5CYsOXevVL9/ZNf7NGKWs6UQFiFlezWd9hneprH69vXENDPxDSemTGc8qfW y9/r512ch8xF2IUPyV5WJ1kV4WWwWCMev0OsBWjA1ihUGnmyp1L9gWESCmBK47Wz7/8MCi OTGFg5Bd/NBp19USIG51H1gWGy18uTw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=A3n3OzuD; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf12.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718098297; a=rsa-sha256; cv=none; b=QACcNHFLnN/IyQWGTmCROXICkhg47NBDeubHz58RrYcQX25Sk/pGY0zGF0eb7PoCYXBjk1 kM9EwprGhhyDMxZKpQA2E9atzXUB6Yy8nzZ6O7DHCj6xx7oTzffGSPLS7blmAmx9bSRim4 LDbMQ+i+k0FaHV5SJygLfbTVSG3o+yk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718098296; 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=uG737WfG6Tkr1k/786kxDcpDifeb+2U34yvKgaEkzs0=; b=A3n3OzuDKDZapPuZWBLhFET9MzWi+6kgofBnS9sOosKoycju/wJhRcadGqcmAw1k4cfq2s 4nVVac6DDGV0wuA1dfEI10mMXWvcaHGE1GCFOr4C9JCUOL4hu76hPcOrFzMDsJtSGV04M9 +DSg5O51C7Wy/FdqmyNy5MiDAXWdCDk= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-jhy7RzaCNWKi762lY11VJg-1; Tue, 11 Jun 2024 05:31:34 -0400 X-MC-Unique: jhy7RzaCNWKi762lY11VJg-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-52b99933b68so4319038e87.3 for ; Tue, 11 Jun 2024 02:31:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718098293; x=1718703093; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from: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=uG737WfG6Tkr1k/786kxDcpDifeb+2U34yvKgaEkzs0=; b=jacHn7G9iP5qNC43MosIrroETGkkjTWgfzaIxsKtSHfQ5O0Ytb+NVrOVtabuSotmkg vKFaXSa+rKXhm+94uSTx0DraJMquffQCp/PhEeel3ozOxoCrkkN1L+8HMwJlsrF1Ug1w utK9EiOtwb029q0NOpzLPmP2sg0VODzwpqC5vHv0+ubwT2FG1jXimp99H4dnxUSLWpI/ OqFW44hwf0/J+o8t5iMhcvPkGhXST8A684WDhmtsoATy28QqSm3YgeFftQoB1mHE+V3J DAXW6d+TJsOlfpNmqUwRtNn7FvzSgzuYnTNoOR8J0QFPTdbVJsGmx1Gwfr0Ka7lrSw6G LMeQ== X-Forwarded-Encrypted: i=1; AJvYcCVtlzwNnqn90u+vol71uwoVYWPA5prMeha5z1Rg74LJsOYt10roriajApXZ1+UcOfZGj91s1ZWqFtnRBa+JbucsWAU= X-Gm-Message-State: AOJu0Yxylu6UOp+cYSMLhyWMeVw+tACRr325+/ElhUBm/ruPJmM6N7VD H7aIoAwPJ8nsMsfmjvOk9Xs5vyUNOYiWyKC4pmKX5v3gIESPIA/hOILowhhNnfomauPqB9YFaIw /+YCZ4Uoiqi3i5c2HnAlXS6yATZOqFMmhhAfgklq15rXPhz5c X-Received: by 2002:a05:6512:33ca:b0:52c:9421:2739 with SMTP id 2adb3069b0e04-52c94212a77mr1128628e87.9.1718098292962; Tue, 11 Jun 2024 02:31:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwY43q16ah4tKmJLasiEw8hEatDj9bDQW7O57GFFvLqtN/5X7hzHWJoq6L0qvv09aAoMGvgA== X-Received: by 2002:a05:6512:33ca:b0:52c:9421:2739 with SMTP id 2adb3069b0e04-52c94212a77mr1128603e87.9.1718098292510; Tue, 11 Jun 2024 02:31:32 -0700 (PDT) Received: from ?IPV6:2003:cb:c748:ba00:1c00:48ea:7b5a:c12b? (p200300cbc748ba001c0048ea7b5ac12b.dip0.t-ipconnect.de. [2003:cb:c748:ba00:1c00:48ea:7b5a:c12b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c2cd247sm175758845e9.40.2024.06.11.02.31.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 02:31:32 -0700 (PDT) Message-ID: <6580fccb-cbd8-480b-9405-b6191ae87754@redhat.com> Date: Tue, 11 Jun 2024 11:31:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/5] cleanups, fixes, and progress towards avoiding "make headers" To: John Hubbard , Jeff Xu Cc: Andrew Morton , Shuah Khan , Andrei Vagin , Axel Rasmussen , Christian Brauner , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML References: <20240608021023.176027-1-jhubbard@nvidia.com> <95005e7c-3705-48c5-8ee2-3d9b0688fcbc@nvidia.com> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCj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MATbHyqLt7/oz/5deGuwxgb65pWIzufa N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3 AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq 3ecsQDv0fFJOA9ag5O3LLNk+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: <95005e7c-3705-48c5-8ee2-3d9b0688fcbc@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9B1A840004 X-Stat-Signature: zrcznwzk53s7uuhb5hh7jprdfrgbdph3 X-Rspam-User: X-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+lOfjK/InPZjxBh61cs8et0UDWpuJ2Yx6gCmwdIuX4hl+DsRtf1NVoADSXirqtGEe8gdvQKbt2wvTtdtxg9CAP4sDDrtpmmXAQ3ZYFv3FutERRz+arIMP0ULWCPqbEYhL6OSlFM2q3oEegBqq6OGFVekLymTwlhEM8xqIJO0YBW/20GrGBaDddD37fO4tsoOSQ7zVVeFhK0/E6LGNOBsNRxcssoh1MYh694GXc09GiQluTjPFJLcTRCYxiTpS5RAAHPgZ4ehPhCls8Z6+Spnu9TLmQGiwu6VPAHLVxT6aml6YSyfr3KMtO/u3R3gidbLAtmvhjZLg6RAfAdkMO7WRz693yh+x24yp4VQUeoBBCkPBxdXULvNVAwVhq5rEHFzT7IPD4JuKxdSnhS+bOh7fgzSBMYew6cj4pYEsv08PzN0PdLNrMOwyRyoG4ACwZ8UTvUtZUt32XcK3feyO3wGGl1fl5eqtWo/ZDCg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000015, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 11.06.24 08:25, John Hubbard wrote: > On 6/10/24 9:45 PM, Jeff Xu wrote: >> On Mon, Jun 10, 2024 at 9:34 PM John Hubbard wrote: >>> On 6/10/24 9:21 PM, Jeff Xu wrote: >>>> Hi >>>> >>>> >>>> On Fri, Jun 7, 2024 at 7:10 PM John Hubbard wrote: >>>>> >>>>> Eventually, once the build succeeds on a sufficiently old distro, the >>>>> idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then >>>>> after that, from selftests/lib.mk and all of the other selftest builds. >>>>> >>>>> For now, this series merely achieves a clean build of selftests/mm on a >>>>> not-so-old distro: Ubuntu 23.04: >>>>> >>>>> 1. Add __NR_mseal. >>>>> >>>>> 2. Add fs.h, taken as usual from a snapshot of ./usr/include/linux/fs.h >>>>> after running "make headers". This is how we have agreed to do this sort >>>>> of thing, see [1]. >>>>> >>>> What is the "official" way to build selftests/mm ? >>> >>> From Documentation/dev-tools/kselftest.rst, it is: >>> >>> $ make headers >>> $ make -C tools/testing/selftests >>> >>>> I tried a few ways, but it never worked, i.e. due to head missing. >>> >>> You are correct. Today's rules require "make headers" first. But >>> I'm working on getting rid of that requirement, because it causes >>> problems for some people and situations. >>> >>> (Even worse is the follow-up rule, in today's documentation, >>> that tells us to *run* the selftests from within Make! This >>> is just madness. >> >> That is hilarious! :) > > :) > >> >>> Because the tests need to run as root in >>> many cases. And Make will try to rebuild if necessary...thus >>> filling your tree full of root-owned files...but that's for >>> another time.) >>> >>>> >>>> 1> >>>> cd tools/testing/selftests/mm >>>> make >>>> >>>> migration.c:10:10: fatal error: numa.h: No such file or directory >>>> 10 | #include >>>> | ^~~~~~~~ >>>> compilation terminated. >>>> >>>> 2> >>>> make headers >>>> make -C tools/testing/selftests >>>> >>>> make[1]: Entering directory >>>> '/usr/local/google/home/jeffxu/mm/tools/testing/selftests/mm' >>>> CC migration >>>> migration.c:10:10: fatal error: numa.h: No such file or directory >>>> 10 | #include >>>> >>> >>> Well, actually, for these, one should install libnuma-dev and >>> numactl (those are Ubuntu package names. Arch Linux would be: >>> numactl). >>> >>> I think. The idea is: use system headers if they are there, and >>> local kernel tree header files if the items are so new that they >>> haven't made it to $OLDEST_DISTO_REASONABLE. >>> >>> Something like that. >>> >> But I don't want to install random packages if possible. > > Well...keep in mind that it's not really random. If a test program > requires numa.h, it's typically because it also links against libnuma, > which *must* be supplied by the distro if you want to build. Because > it doesn't come with the kernel, of course. > > So what you're really saying is that you'd like to build and run > whatever you can at the moment--the build should soldier on past > failures as much as possible. > >> >> Can makefile rule continue to the next target in case of failure though ? > > That could be done, in general. The question is if that's really what > we want, or should want. Maybe... In cow.c, we warn if liburing is not around and build the test without these test cases. check_config.sh senses support. We could do the same for numactl (numa.h), but maybe there would not be any test case to run in there without libnuma (did not check). Some tests also require lcap. -- Cheers, David / dhildenb