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 E2DB2C25B76 for ; Tue, 11 Jun 2024 04:46:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 605D06B0095; Tue, 11 Jun 2024 00:46:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B6106B0098; Tue, 11 Jun 2024 00:46:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47D3A6B0099; Tue, 11 Jun 2024 00:46:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 28B676B0095 for ; Tue, 11 Jun 2024 00:46:13 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D44EA1609E0 for ; Tue, 11 Jun 2024 04:46:12 +0000 (UTC) X-FDA: 82217370984.25.CCE1DCE Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) by imf16.hostedemail.com (Postfix) with ESMTP id 175C2180003 for ; Tue, 11 Jun 2024 04:46:10 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=iOK50try; spf=pass (imf16.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.160.48 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718081171; 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=CIoabIczz86lr8Q01sQG2GhLk5y0SCRcj0MaX6R+rEA=; b=OYwuYDgJGdAahnysqFj4iKPu5fzY5YjKupMkKZZA5Qq4OgRsKVhSH7xwnDkMXVTSMo7nSh O7fHhC0yuNq1E6ZKkUJLhGIg+MH9qc3oY7CsMYIm23yaSPZTd3lWPYtGyBWzRFQ3b3Gpic RzD9R7XYwQEjrU3NJKqfpI1Dov+Nr2M= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=iOK50try; spf=pass (imf16.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.160.48 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718081171; a=rsa-sha256; cv=none; b=HeBiUOm6bGod5ixPMuHBrogAe2RIm3m1jDCrOl/uYLazonTFW20OOOxV/PQFgeLFKxluAW ceTkofu33veNWNbzm4Wtcs6WNRQtkPBF7k7BaRuNLrDyAkm1gVue1Gw94osNbJ8n1o+M3h 5D0jnP6kdaGgfwmpuqYNH+Mnrpw9zY0= Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-254a370e7a4so960458fac.1 for ; Mon, 10 Jun 2024 21:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1718081170; x=1718685970; darn=kvack.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=CIoabIczz86lr8Q01sQG2GhLk5y0SCRcj0MaX6R+rEA=; b=iOK50trygYXyo4IlvnHbYYSjyDrd6VZU5rrlEVgTXOZdCPCsLoxP7lu3qAmLh/TNGK qBUPeylEoYThu1sP3PUU4CiU4RSuF0Cy52qilmLbyxRJ8dOMZGNtU1Nu9fR9w0rfRpSX U2oibz7WngM1yl9Wr+tcLPA/SALTVGqpSIu48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718081170; x=1718685970; 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=CIoabIczz86lr8Q01sQG2GhLk5y0SCRcj0MaX6R+rEA=; b=ZsbM6HzSgOwRrNmpXdPCIu1+O5PO4enqabOGjVqHlzYs8BtOLDLNjrahSA6M8dtMK7 BBAbobA3IHTKpMEVrOz5wWRp7XAcHb0YRwH67dLo3kyGSBeuUvWZKKRga1xedWvQp5dc RILY9drl0Z7s504oMvV8JR6qknGCPVdmsGYftuzMgKcQpJPzbDhOkHiiFhztCBAvBlw2 zEB/7IXWYwAlFirDdMTB6Au5dxajgeZc0CKowzOZOGOqH4432RkeL9Gbof6Z8ajvp+kM j29RJtl7BJZsqV68b7TF7r1GwPo4XPd++AX66Z1jCJxUrRPM8dnu6P/neXtdv0VF9GKa jeZA== X-Forwarded-Encrypted: i=1; AJvYcCWnOVRnZbimQfwsv04pkCj9ZJt5L5luijjfUSdVEO+tgmaD+oENOHK2BsHS7EjpyM/D/iG8+5xBTRIXmhPPPsVbucw= X-Gm-Message-State: AOJu0Yyo9v1ED+N8K0o72y2Dfo6IlYBcbMmCjcu3yat2aQKjm9Ecs0RV QHoB91HfB75R9EvWh0qJFvAVXVmyAfSdZDbM/opmR43Fg1E399zjSTHvi4kh6C8azu6orKT/3Uk wVlZab0Dyd/2Kk85SufkHgzZmodjusfeu6kgd X-Google-Smtp-Source: AGHT+IHByfiAPO14fNnx4REFTehCbJqqMb4IdmeoDY4CQXPTK8vbG/tux2eHQk3D4fZ3pX6WwvizBlreo/EtSzC41/M= X-Received: by 2002:a05:6870:350c:b0:254:ba68:a6d2 with SMTP id 586e51a60fabf-254ecf7b04emr745965fac.25.1718081169944; Mon, 10 Jun 2024 21:46:09 -0700 (PDT) MIME-Version: 1.0 References: <20240608021023.176027-1-jhubbard@nvidia.com> In-Reply-To: From: Jeff Xu Date: Mon, 10 Jun 2024 21:45:58 -0700 Message-ID: Subject: Re: [PATCH 0/5] cleanups, fixes, and progress towards avoiding "make headers" To: John Hubbard Cc: Andrew Morton , Shuah Khan , Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 175C2180003 X-Rspam-User: X-Rspamd-Server: rspam09 X-Stat-Signature: 1qm7u31qajrpnukdijy8mrhnp6z4o7uw X-HE-Tag: 1718081170-360223 X-HE-Meta: U2FsdGVkX1+yNWgFmh9hishtH4xVqg+MFdVGrVn0uPoN+RA5jqvv/WSAgy/2fpklv4cQpWxPsePTjMInS68Sw6Q9iGGMMmOFk0Rv1LS0NXhg6oCmsdHit2t1WZRZiJxKusAiAp9p8LtbxBci4xbKbe9+tyXlH2dHWsxzpUvypCjuw+gj86tEI5p9srehB9Cv+IjRNHwvUDtC461LVuaxKIdl+FxlOaoJRKmEnkz4juSI7gIeoaukLLagBB1SbosaYTotMiUrTh/mh1sgyTDX0dRS1Adj76lmfHjToyo66SDK6omVXXpQYSg8ACKth1GCJf4I8GWqJpEGmeRSGHt2HEh2faltWxlTFkaTklEQ/jqoZwa/wI/eaFfuom1gKNxkYxCmNo3TxgWjfaPNA/+6tCerOZc3J3V7vRpae8VO8WrKe9KkNZO8uQJRlFSnaIWjOoj1wm7rbDHKhElkArERjrzzEtCtis5ilST3BOw6QN8DLfE6l22MYMXpGqweNpEUwTbwHRQzHDo6eBGX6bXiIUV38WsaVML6Q2LN0BwsWx6UVkzvqFLT19dexweuLAgxezol/L13rvETKk+a1x4kmf+Gl9lErN0iXVh1aoSMKax+Sd7GOKdI8pfY+DUKJAbtw9+AO8BYzKD+YUc4Z1aiKD6pmbuXVfQSv6AUxxqWIA8bOlOX2/dmjjZx31ut5nzwEBVv3lbh0V8lOm0WgqunxnW1VMXO87QgC8fSDbHIcwuSmX4AzhRCCQvgXRpxoDL8raDZ1ezv0HHWhDX2Hklz6a2PIJ3DjCculllIx5QsMU2oom+PdPl0WKspItVvIZMrTcBTAi8IoJrfRh5MJ1HnjeSPvi2V0x15iQmbvf5hf0pRnEdwT7SX9G9GNUXi7uuRWH9ZCwJiJiH/i/I2lWlRL/w6vTfJ2tbVNFEyrKDq0AL/wvoo+4J8fQeQEW51TtwHWRBvdPUTjFK/bMAREi6 hdKr9Rga jPqbJCtL2phAEm1Pk4xkqAzhZ2pX3wM3nx5TQpAeSfi3F91sL7176OF0xdwdVx1ke5z6TFJk9o7SJdEfR7QJHOoekd0qgw3x6BocAQTOPobrc7gmXAvtP9H2FobC/3NfaUQDy2Whgb+iqZjLfVqzeUG5JlPiLirY8qKWd X-Bogosity: Ham, tests=bogofilter, spamicity=0.053386, 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 Mon, Jun 10, 2024 at 9:34=E2=80=AFPM John Hubbard = wrote: > > On 6/10/24 9:21 PM, Jeff Xu wrote: > > Hi > > > > > > On Fri, Jun 7, 2024 at 7:10=E2=80=AFPM 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 th= en > >> 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 so= rt > >> 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. Can makefile rule continue to the next target in case of failure though ? right now it stopped at migration.c , if it continues to the next target, = then I don't need to use gcc to manually build mseal_test. > So if you systematically install various packages on your machine, > then apply the various patches that I have floating around, then > you will be able to build selftests/mm without "make headers", at > this point. Or so I claim. > > thanks, > -- > John Hubbard > NVIDIA > Thanks -Jeff