Adding the log of a very productive IRC conversation for reference. Sorry for the formatting
‹lars_kurth› It
would also be good if some maintainers could have a look at
https://lists.xenproject.org/archives/html/xen-devel/2019-12/threads.html#00348
‹gwd› lars_kurth: What
exactly more feedback did you want?
‹lars_kurth› gwd:
primarily about maintainers workflow. How do you approach a review. Is there
anything a code author can do. Right now, I have one data point from Jan. I
basically want to validate my assumptions before I send out another revision
‹lars_kurth› gwd: a
code author can do to make your life easier => e.g. by putting big picture
stuff at the beginning of a series
‹lars_kurth› e.g by
putting potentially controversial elements of it at the beginning, etc
‹lars_kurth› Obviously,
this would only help if most reviewers approach a review sequentially, which is
a reasonable assumption, but I am not actually 100% sure this is true
‹royger› lars_kurth:
patch series must be reviewed sequentially, that's why it's numbered
‹gwd› lars_kurth:
Actually it's often the case that you find uncontroversial side clean-up things
in the course of doing a series; putting those at the beginning means they can
be checked in independently of the whole series, which makes less work for
everyone
‹gwd› They can be
checked in after v1 or v2, and then 1) less work for authors to rebase, 2) less
cognitive overhead for reviewers to see what's going on.
‹lars_kurth› royger:
That is not a necessarily obvious conclusion - at least for me. But if it is
true, we should clearly state that
‹lars_kurth› gwd:
that's interesting. I guess there are differing objectives
‹royger› I
don't think any maintainer/reviewer does review non-sequentially, as it would
lead to extreme confusion. It's quite common for patches on a patch series to
rely on the previous ones
‹royger› lars_kurth:
I think it can be safely stated
‹lars_kurth› 1) get
uncontroversial / easy to do stuff first
‹lars_kurth› 2)
then put more complex things, but start with documents/headers/anything that is
substantial to understand the rest of the changes - if they fit into logical
units maybe repeat that pattern
‹gwd› I think every
situation if different.
‹royger› the
only time you can get non-ordered review is if your patch series touches
multiple subsystems and you have properly splitted this into different patches,
in that case each subsystem maintainer is likelky to review his ares without
looking at other patches
‹gwd› royger: You're
talking about checking in, not review I think?
‹gwd› Sometimes in a
long series, {1,2}/10 will be clean-ups; {3-6}/10 will be general
reorganisations which don't really seem to do anything; and then 7/10 will be
the "meat", which helps you understand what {3-6}/10 were about.
‹lars_kurth› royger,
gwd: "It's quite common for patches on a patch series to rely on the
previous ones" - is an important point.
‹gwd› Usually it's not
possible to put 7/10 earlier without making it far more complicated.
‹lars_kurth› I
think the way how to best structure patch series is an important one, and there
is practically NO information about this. So people learn stuff by trial and
error. So I think it is worth exploring that
‹gwd› It's a bit like
saying, "How do you teach someone something", or "How do you
make an argument to convince someone of something". There are patterns,
but it's so broad a topic you can't really give direct advice.
‹lars_kurth› gwd:
maybe showing some examples will help. I think the problem is that cover
letters frequently don't help much
‹Diziet› I think what
you just said above "Sometimes in a long series," would be a very
useful thing to put in as a general rule.
‹Diziet› gwd: ^
‹Diziet› Sometimes some
of these pieces will be empty.
‹Diziet› 1. cleanups 2.
reorgs 3. headers/docs/etc. 4. meat 5. cleaning up any infelicities introduced
temporarily 6. deleting old code
‹Diziet› If there are
multiple subsystems involved, then these are best separated out where possible,
so you end up with those 6 categories x N subsystems.
‹gwd› Of course, sometimes
there are several "meat" patches, which could be ordered in different
ways; and then you may want to put reorgs in between the meat patches.
‹gwd› The XSA-299
series is an example of that.
‹Diziet› In this
context I am reminded of
https://www.chiark.greenend.org.uk/pipermail/sgo-software-discuss/2019/000616.html
My main achievement for the weekend, in a personal project.
‹gwd› And lars_kurth
could probably go back over the history and see the series develop; the
"meat" patches were reorganized several times to try to find out
which order created the most comprehensible series of individual patches.
‹Diziet› Subject: New signature key arrangements
‹gwd› lars_kurth: And
say, if you take a look at the golang xenlight bindings series; v1 would have
been useless without the entire thing being checked in. It's likely that v3
I'll be able to check in {1..16}/22, meaning v4 will have a lot fewer patches
to rebase / recheck.
‹Diziet› I'm not
suggesting it as an example in this context because I have done much less
squashing than would be usual in a community like Xen where we have many more
reviewers so the goal of making review easy and comprehensible is more
important relative to the goal of later understanding what the original
programmer was thinking when they wrote soemthing.
‹lars_kurth› This
is very useful. I think this is the missing piece
‹Diziet› But we should
provide some examples. Do we have good example cover letters we could use ?
‹Diziet› I'm sure there
are some libxl ones but ideally we would have an example touching multiple
subsystems. And one which wasn't affected by release constraints.
‹lars_kurth› That
would be good. Maybe I can write something up and put a place-holder in place
for good examples, if we can't think of one now
‹jbeulich› gwd,
lars_kurth: The opposite case (cleanups last) would often be preferable for
series where the "meat" one(s) are to be backported, but the cleanups
aren't.
‹lars_kurth› jbeulich:
interesting point. Do you have an example?
‹jbeulich› An
example of what? A series where we asked for re-ordering because of the above?
If so, I don't think I could easily spot one.
‹jbeulich› I
can tell you though that the above is what I would typically do. Most
prominently for security fixes *where the cleanup is being held back
altogether).
‹lars_kurth› jbeulich:
I will try and put something together. I think I have enough to go on