All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Ian Jackson <ian.jackson@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH] x86emul: fix test harness and fuzzer build dependencies
Date: Thu, 20 Dec 2018 09:05:40 -0700	[thread overview]
Message-ID: <5C1BBDD40200007800208289@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <23579.46083.675322.495659@mariner.uk.xensource.com>

>>> On 20.12.18 at 16:23, <ian.jackson@citrix.com> wrote:
> Jan Beulich writes ("Re: [PATCH] x86emul: fix test harness and fuzzer build 
> dependencies"):
>> On 20.12.18 at 15:46, <ian.jackson@citrix.com> wrote:
>> > I think this introduces a `make -j' hazard ?  The problem is that this
>> > branch of the Makefiles tree might enter tools/include while
>> > another branch is also doing so, resulting in two simultaneous
>> > executions in the same directory.
>> 
>> What is "another branch" here? So far I was under the impression
>> that the ability of building x86 emulator fuzzer and test harness
>> independently is an exception, and that all other parts of the
>> tools/ subtree are supposed to be built by going through the top
>> level. Otherwise further dependency issues might arise, due to
>> top level Makefile's %-tools-public-headers rule.
>> 
>> Hence whether there's a "make -j" hazard here depends on what
>> that top level rule's purpose is.
> 
> I don't follow.
> 
> The top-level %-tools-public-headers rule is there to be something
> that you can write in the dependencies of other subdirs, to arrange
> that $(MAKE) -C tools/include is run before that other subdir.
> 
> Ie, it is there to satisfy the requirement I mention above, that the
> dependency directory is built first.

Which effectively means anything underneath tools/ (and whatever
else subdir which depend on one of said rules) is liable to fail to
build without having come through this (top level) rule.

But this is not a property this patch introduces or changes. It just
re-arranges how things get done. That is, I'd like to ask for the
change to be acked (or a concrete proposal be made for what
needs to change) _without_ fixing breakage that might be there
and the introduction of which you may have missed, or else I'm
sure you would have commented on what is now eddf9559c9.

> I wrote:
> 
>    (It is possible to violate this rule without creating races but it
>   is tricky and inadvisable.)
> 
> If we are determined that it must be possible to run make in the x86
> emulator fuzzer directory *without having previously built the rest of
> the tree normally*, then perhaps it is necessary to do this
> $(MAKE) -C thing.
> 
> But in that case we need to make sure that either:
> 
>  A. 1. The top-level Makefiles ensure that *a* build of
>        tools/include completes *before* starting to enter
>        tools/fuzz/x86_instruction_emulator.  (Which I
>        think is the case.)

Yes, by said dependency on %-tools-public-headers.

>     AND
> 
>     2. make -C tools/include is definitely completely read-only if the
>        thing has already been built.  (This is somewhat hard to check
>        and maintain, and would need a comment in that Makefile to
>        ensure that this property is preserved.)

Isn't that a property that's supposed to hold for almost all (sub)trees,
i.e. it's rather the exception that an already built tree will see further
changes when re-built incrementally without the sources having
changed? That said, we have to consider such a case here, due to
the use of move-if-changed in xen/include/xen/lib/x86/Makefile. But
this still doesn't violate the fully-read-only requirement, as the rule's
commands won't be executed again when the dependencies are
older than the target (as is going to be the case after the invocation
of the build from the top level Makefile).

Bottom line - can you please be concrete as to what I need to change
in the patch (and in particular in the change to tools/include/Makefile,
as the other pieces are under x86 maintainership anyway) to get your
ack, without requiring me to address issues I don't (currently) care
about, and that have been there before?

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-12-20 16:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14  8:49 [PATCH] x86emul: fix test harness and fuzzer build dependencies Jan Beulich
2018-12-17 15:57 ` Andrew Cooper
2018-12-20 14:46 ` Ian Jackson
2018-12-20 14:56   ` Jan Beulich
2018-12-20 15:23     ` Ian Jackson
2018-12-20 16:05       ` Jan Beulich [this message]
2018-12-21  7:39         ` Jan Beulich
2018-12-21 14:16           ` Ian Jackson
2019-01-04  9:32             ` Jan Beulich
2019-01-14 15:09               ` Ian Jackson
2019-01-14 15:44                 ` Jan Beulich
2019-01-14 16:59                   ` Ian Jackson
2019-01-15  8:29                     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C1BBDD40200007800208289@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.