[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2][4.15] tools/x86: don't rebuild cpuid-autogen.h every time


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 11 Mar 2021 17:21:38 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DsbX3b0NSX/ShaOyXjQ6Rh6gdTVgcTVOKz9f1MHxwCo=; b=XUUPcZc6FHYnsQf88OkQRFIFoIE0/0/uex2MG79H+W2UnUeYFBg0C2PTW0RS4EdncThSj0qVHf8VoOrDzBlrN8Pj0VlZid3ed0mWCnlCaQ8FNVa4g0fvUljEUsR11m+G2WNXtuiudEakZfClEmT7S2yfYrgCVMl3kM9w91oELDn+aW+/eGm8daGPfscWN2SJ9oPheJbuIPp8bgLb8BwB72iEZB4Sntq+q6wRPgoHgFFztVmKuf1Ez7GOHFsyhK/CdlEp2zWsIrhgmR+K2WdLrGTwrFfyXN/yxh28UnGxydzypddlQq7E03ByrnrA7Cg9RSJhBalgYw6zRQJDls3wQA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c7lzQv9MNF7O2GOrB5JjMbetIH9Gp/exudPvqUcebn2tBKfaRk4f6jdsr3wprYTs2nlOc4LdH96+Aav71OfeYOtOTT7iCdaBaWfIFwNPbzl2PeJGALCG2alzMWL4zzOC71q8iSZxRdba7QauW4Nub501DjI2uyVEfdHjr8l8cRBMqSzhOrBzj/6cPtUl02zU+nDDSq3oWDTAz5MC93zXFEKNAfqjZIWmbVn2uLWuI31GYCPN1yIwimVTNSAM8bszSQ2A0OzKY8kKZvdLt5833uSSyHFe+iKM3tqjFldXHSh6cdecCT63th1cMUIhQPRAsktpL/T9q6PaGXhrj0dXqg==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 11 Mar 2021 16:22:00 +0000
  • Ironport-hdrordr: A9a23:QmphW6g2VCAp78tispaUPvnYwXBQXwh13DAbvn1ZSRFFG/Gwv9 yynfgdyB//gCsQXnZlotybJKycWxrnmKJdy4N5B9efdSPhv3alK5wn0Jv6z1TbaknD38N+9Y MlSahxD9XsEUN35PyR3CCUG8stqePpzImGnuHbpk0CcShPS4VNqzh0ERyaFEoefngiObMcGI CH7sRK4xqMEE5nDfiTPXUOU+jdq9CjrvuPDSIuPBI79BKIyQqh9b+SKXOl9y0DWDBCy6pKyx mmryXF4MyY0s2T+1vn+EL4q79Xn9bgzdUrPr3wtuElbg/CpyztSIBoW7iptC04rue1+D8R4a XxiiZlBetfwTf8eXy0vAvM1mDboUkTwk6n83C0qz/CptH0Xz0zAcYpv/MmTjLpr3AOkfs59Y Aj5RP/i7NnSSnusQ642v3zEzZtrUawqWpKq59ps1VvFbEwRZUUkZYS5ypuYfE9NRO/0q8LOs 90AvrR4f5HGGnqFUzxjy1UzNugUm9bJGb+fmEy/sic0z1hlHtk1UcvxMsGgnca9J4mIqM0n9 j5Dg==
  • Ironport-sdr: 1bC2Bhdl5EJt07OcrDko0UUv9iRN3v+bE7ZCDa2n2g8QdB81Wj7nP65UMkMN0RpA91f9Oxuoqo G98XOsCyGTSUoLahRAMy03et+rQAcAfP0w76BwwJHOr5pcJ56cgMszPEj6hnx6xYBiU3WcQCTC FhficPxyU/nnv6H80SRs6Iop3Ru7HUkHdI3oMFkcI1Gpqwe3hUmWMcxj69UWG9FzK5zKFPWTU0 YY5yE9ipFpdZv/5L77uqSsRVg15gVO+Xr6+Zt2LqPhgqsgt42LhrlfhLD7cU0YnWUC2Dc/qhyg mkA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Mar 11, 2021 at 05:00:12PM +0100, Jan Beulich wrote:
> On 11.03.2021 16:29, Roger Pau Monné wrote:
> > On Thu, Mar 11, 2021 at 03:40:05PM +0100, Jan Beulich wrote:
> >> The first thing the "xen-dir" rule does is delete the entire xen/
> >> subtree. Obviously this includes deleting xen/lib/x86/*autogen.h. As a
> >> result there's no original version for $(move-if-changed ...) to compare
> >> against, and hence the file and all its consumers would get rebuilt
> >> every time. Instead only find and delete all the symlinks.
> >>
> >> Fixes: eddf9559c977 ("libx86: generate cpuid-autogen.h in the libx86 
> >> include dir")
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> >> ---
> >> v2: Different approach.
> >> ---
> >> Ian did suggest to pass -0r to xargs (and -print0 to find), but I
> >> couldn't convince myself that these are standard compliant options. We
> >> don't use any special characters in file names, so -print0 / -0
> >> shouldn't be necessary at all. The stray rm invocation when there is no
> >> output from find can be taken care of by passing -f to it.
> > 
> > Why not use `-exec rm -f {} +` instead? That seems to be part of
> > POSIX and is likely nicer than piping to xargs?
> 
> Hmm, I avoided it because I was under the impression that there
> are (compatibility) issues with it, and Ian suggesting xargs
> seemed to support that. I'd be more than happy to avoid xargs,
> of which I've never been a friend.

All I can tell is that '-exec ... {} +'  is part of POSIX [0], and I
can confirm it works on FreeBSD. I have a slight preference for -exec
instead of xargs because I think it's cleaner, but I think your
current one is correct, so:

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

For either one.

> >> --- a/tools/include/Makefile
> >> +++ b/tools/include/Makefile
> >> @@ -19,7 +19,7 @@ xen-foreign:
> >>    $(MAKE) -C xen-foreign
> >>  
> >>  xen-dir:
> >> -  @rm -rf xen acpi
> >> +  find xen/ acpi/ -type l 2>/dev/null | xargs rm -f --
> > 
> > Do we care about leaving an empty xen/libelf directory behind?
> 
> Why would we? It'll get created immediately afterwards if it's
> not there, and it'll initially be empty (not for long of course).

Right, also the 'clean' target will still rm the whole directory.

Thanks, Roger.

[0] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.