[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: Fri, 12 Mar 2021 10:17:31 +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=WXEesVwcIzvJnI2AeWvQ2pA4aR7oZWJHG/XQjhGHEvU=; b=SB9f7OzjUrmmkEWqfYMNMb67KJWkdf+foFPaJuSwkTU+AQLLh6HHzK6YUwktHvAEF9Opm+o/SED2I/EAj77mPbMZMyK6XW0lckJt8MGuYFHsmwEITSRwDLjO30R9kPjkDSr3fmohI4VG4vHfcypSqEYZ5qA1SIYMIOQ3TUcxj3Ya7LrZ2cwE/i1sy4OR627VZbCRXl+p3T+FrtVzP7Kn8VnE/RN6phZIW5JV1rwy+tgV4r8tkd+UuxzHrGAikcx6CCxIThmMKXNFQob9cp49vlP0RP+DkUKLpJ4oTtCQiF6mmqcv4uQr88mi08f87lQae8pN2wwUSASnqNYI7+8C9w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQtADgaxehEK7j6KLDLkoGfr7fnuQZspHHGLjqthWGmRcasEy1w+pirEprCHE6mbCTCX12L/iUir7Aj3e/xvhbP2m5Ww3hHj5XRSRmepe46ELuvtC9gIL9rKQl9zrHPi4QwONZhQONiF6JQyKjaPzMcCsa206FNYnsJbfFt7Tm4zSZ50PA/+E+TPPkTivKuc3S4BjjJZlam2UTp642p1RI3BObtNK0rKM34qj09lHv6dGnbTsRX3YiGGI5QKKfT5ndlelUFGi8oMp9g8gueqHMyJKB/hYYqarP0MsK1BhpbwazgUSSBEwjlzhfqVIkI7Q3xuonTIKak3fDCxZ3Km/w==
  • Authentication-results: esa1.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: Fri, 12 Mar 2021 09:17:48 +0000
  • Ironport-hdrordr: A9a23:W+kDaqDM6p12wRXlHeh+sceALOonbusQ8zAX/mhsVB1YddGZnc iynPIdkST5kioVRWtIo729EYOLKEm9ybde544NMbC+GDT3oWfAFvAH0aLO4R3FXxf/+OlUyL t6f8FFYuHYIFBmga/BjzWQPM0nxLC8npyAocf74zNTQRpxa6dmhj0JbzqzNkFtXgFJCd4YOf Onl6l6jgGtc3gWcci3b0NtN4T+jubGiY78Zlo+DwMngTPksRqT9LX4HxKEty1uMQ9n/LFKyw n4uj283IqPmbWRyhjQ12jchq4m5efJ+594K+GnzuQQIjXooA60aIpmQK3qhkFInMifrGwEvf OJjxA8P9liy365RBDLnTLdnzPO/Rxry3j+xUSWiXHuyPaJOg4SOo56qq9yNj76gnBQ2+1U4e Zw8E+y86dzN1fmmh/w4tDZPisa7XackD4ZvsM4y0BEXZB2Us42kaUvuHl7Pb0nByzA5IUuAI BVfbvhzccTS1+cYnzD11MfueCEbzA2FheCdEAIptaY5ThQhGx41EsV3qUk7w89yK4=
  • Ironport-sdr: zBaAJxJi7sVu5ZNg+6xKSpVMBcDcFXxfABl4ZwDezWOGVJlfluVIAgmkXioDB3aFzOciJaS4+U ke9hggUxurxCRtixRSa5mXgdCGYMQkHIrLZN13ja07GclfExOPzqDqiHQPgPSoldeoe55OEsY5 0fymLuijjiojSmVyXwVc9fMOJhS/zXjKnGp1EK0x4RboyZH50ObPRJRW89g9Rq0/fO/VxY7ZRa fnwVTAmC2c1zVhL5SfAQ3EhEo1h2lwbK2olThU20TeI2uER7zM/0xyh/TIsQJQXnJ2pFus1JZk iHs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Mar 12, 2021 at 09:45:35AM +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?
> 
> I've looked around some more and also remembered an aspect because
> of the looking around.
> 
> 1) xargs has special provisions to not overrun argument space (leaving
> a gap of 2048 bytes). Nothing like this is said in the spec for find,
> and in fact I recall having had issues when the accumulated arguments
> needed splitting. This was on an old distro, but I wanted to mention
> it.

Oh, the POSIX spec does note this:

"The size of any set of two or more pathnames shall be limited such
that execution of the utility does not cause the system's {ARG_MAX}
limit to be exceeded."

I would argue that not doing this is a bug.

> 2) I've found (old) indications that the {} may be troublesome to
> some distros (Solaris was mentioned) and might need quoting. (This
> would of course be easy to deal with.)

Hm, OK. I won't insist then. I'm not sure we should still consider
Solaris as supported anyway. It's likely to explode in a lot of ways
when trying to build.

Do you really need the stderr redirection to /dev/null of find output
when using xargs though? As that will just drop error messages, making
failure diagnostic harder.

Thanks, Roger.



 


Rackspace

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