From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tamas K Lengyel <tamas.lengyel@zentific.com>,
Julien Grall <julien.grall@arm.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <jbeulich@suse.com>,
Razvan Cojocaru <rcojocaru@bitdefender.com>
Subject: Re: [PATCH] mem_access: Use monitor_traps instead of mem_access_send_req
Date: Fri, 29 Jul 2016 17:27:02 +0100 [thread overview]
Message-ID: <d79fa57b-4e17-dab8-bb71-0790aa008275@citrix.com> (raw)
In-Reply-To: <CAErYnsgkHZgu_cHXmoP=jXji7ES1SOs6r08BbQE3hYs053ZaEQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3268 bytes --]
On 29/07/16 15:21, Tamas K Lengyel wrote:
>
> On Jul 29, 2016 02:50, "Julien Grall" <julien.grall@arm.com
> <mailto:julien.grall@arm.com>> wrote:
> >
> >
> >
> > On 28/07/16 23:54, Tamas K Lengyel wrote:
> >>
> >> On Thu, Jul 28, 2016 at 2:38 PM, Julien Grall <julien.grall@arm.com
> <mailto:julien.grall@arm.com>> wrote:
> >>>
> >>> On 28/07/2016 20:35, Tamas K Lengyel wrote:
> >>> This patch is doing more than it is claimed in the commit message.
> >>>
> >>> In general, moving the code and introducing changes within the
> same patch
> >>> should really be avoided. So please split it in 2 patches.
> >>
> >>
> >> Well, the changes are largely cosmetic so doing a whole separate patch
> >> IMHO is an overkill. How about adjusting the commit message to
> >> something like "sanitize code surrounding sending mem_access
> >> vm_events" to better describe the adjustments made in this patch?
> >
> >
> > I think the wiki page "Submitting Xen Project patches" [1] should
> answer to your question.
> >
> > If not, trivial patches are easy to review, merging multiple trivial
> patches in a single patch is not. Moving code and at the same time as
> changing the behavior is fairly difficult to review because it hides
> the real modifications.
> >
> > Regards,
> >
> > [1]
> http://wiki.xenproject.org/wiki/Submitting_Xen_Project_Patches#Break_down_your_patches
> >
>
> The behavior didn't change at all, this whole patch is code
> sanitization. It's not worth doing a separate patch for each minor
> change. The few change on the arm side is the vm_event request
> allocation going from xzalloc to stack based and using monitor_traps
> now in a split-out function. It really should be no problem reviewing
> it. Even Andrew requested minor adjustments to be included in this
> patch. Anyway, I'm not looking to change this into a series. If it's a
> no go from your side I'm just going to cut down the ARM side
> sanitization to the bare minimum of using monitor_traps as the rest
> just does not worth the effort.
>
To offer an alternative opinion.
Looking at this patch, I personally would have a hard time justifying
breaking it down any further. Each of the changes are closely related.
However, the commit message could be a lot clearer about which steps are
taken. If I were writing the commit message, I would go with something
a bit more like this:
----8<----
The two functions monitor_traps and mem_access_send_req duplicate some
of the same functionality. The mem_access_send_req however leaves a lot
of the standard vm_event fields to be filled by other functions.
Remove mem_access_send_req() completely, making use of monitor_traps()
to put requests into the monitor ring. This in turn causes some cleanup
around the old callsites of mem_access_send_req(), and on ARM, the
introduction of the __p2m_mem_access_send_req() helper to fill in common
mem_access information.
Finally, this change identifies that errors from mem_access_send_req()
were never checked. As errors constitute a problem with the monitor
ring, crashing the domain is the most appropriate action to take.
----8<----
If in doubt, always spell out each of the changes, and their logical
relationships. If nothing else, it helps people trying to review the patch.
~Andrew
[-- Attachment #1.2: Type: text/html, Size: 4894 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-29 16:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-28 19:35 [PATCH] mem_access: Use monitor_traps instead of mem_access_send_req Tamas K Lengyel
2016-07-28 20:38 ` Julien Grall
2016-07-28 22:54 ` Tamas K Lengyel
2016-07-29 8:50 ` Julien Grall
[not found] ` <CAErYnshxhSzg2n0327z8P9U_Y-K88De0v1j7W82SPH25eCQuTg@mail.gmail.com>
[not found] ` <CAErYnsj+zv7h_sFR7y28xF3TVoytPZOQDG-oR2mEaJG7ZHYthA@mail.gmail.com>
2016-07-29 14:21 ` Tamas K Lengyel
2016-07-29 16:27 ` Andrew Cooper [this message]
2016-07-29 20:52 ` Tamas K Lengyel
2016-07-29 17:38 ` Stefano Stabellini
2016-07-29 21:02 ` Tamas K Lengyel
2016-07-29 21:38 ` Julien Grall
2016-07-29 22:26 ` Tamas K Lengyel
2016-08-01 10:33 ` Julien Grall
2016-08-01 16:10 ` Tamas K Lengyel
2016-07-28 20:54 ` Andrew Cooper
2016-07-28 22:48 ` Tamas K Lengyel
2016-07-29 7:29 ` Razvan Cojocaru
[not found] ` <CAErYnsjM4-5oX2P5A8z-LHcKqTR0pJ+hBcaKDk-57Bt50tzG7g@mail.gmail.com>
[not found] ` <CAErYnsjNjuH7N6feGA+kjMZK+z5oWMtM=94aZt2J0zN718C_4Q@mail.gmail.com>
2016-07-29 14:27 ` Tamas K Lengyel
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=d79fa57b-4e17-dab8-bb71-0790aa008275@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=rcojocaru@bitdefender.com \
--cc=sstabellini@kernel.org \
--cc=tamas.lengyel@zentific.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).