From: David Gibson <david@gibson.dropbear.id.au>
To: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
lvivier@redhat.com, sursingh@redhat.com, qemu-devel@nongnu.org,
qemu-ppc@nongnu.org, Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr:DRC cleanups (part I)
Date: Fri, 2 Jun 2017 13:35:41 +1000 [thread overview]
Message-ID: <20170602033541.GM13397@umbus.fritz.box> (raw)
In-Reply-To: <d8d8aa98-46de-ae2e-1da9-25e9a53fd89b@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3177 bytes --]
On Thu, Jun 01, 2017 at 12:41:40PM -0300, Daniel Henrique Barboza wrote:
>
>
> On 06/01/2017 02:30 AM, David Gibson wrote:
> > On Wed, May 31, 2017 at 11:25:41PM -0500, Michael Roth wrote:
> > > Quoting Bharata B Rao (2017-05-31 23:06:46)
> > > > On Thu, Jun 01, 2017 at 11:52:14AM +1000, David Gibson wrote:
> > > > > The code managing DRCs[0] has quite a few things that are more
> > > > > complicated than they need to be. In particular the object
> > > > > representing a DRC has a bunch of method pointers, despite the fact
> > > > > that there are currently no subclasses, and even if there were the
> > > > > method implementations would be unlikely to differ.
> > > > So you are getting rid of a few methods. How about other methods ?
> > > > Specially attach and detach which have incorporated all the logic needed
> > > > to handle logical and physical DRs into their implementations ?
> > > I would avoid any methods that incorporate special-casing for
> > > physical vs. logical DRCs, since that seems like a good logical
> > > starting point for moving to 'physical'/'logical' DRC
> > > sub-classes to help simplify the increasingly complicated
> > > state-tracking.
> > Right, I'm looking at making subclasses for each of the DRC types.
> > Possibly with intermediate subclasses for physical vs. logical, we'll
> > see how it works out.
>
> Back in the DRC migration patch series I talked with Mike about refactoring
> the DRC code in such fashion (physical DRC and logical DRC). But first I
> would
> implement some kind of unit testing in this code to avoid breaking too much
> stuff during this refactoring.
So, I'd love to have good unit tests, but everything takes time.
> I am not sure about the effort to implementing unit test in the
> current DRC code. This series is simplifying the DRC code, making
> it more minimalist and possibly easier to be tested. In the end it
> would be a first step towards unit testing.
..and as you say, extra complexity in the code makes testing and
reliability harder.
>
> However, there is the issue of backward compatibility. I fear this DRC
> refactoring
> of Logical/Physical DRC would be too drastic to maintain such compatibility
> (assuming that it is not already broken). If this refactor goes live only in
> 2.11 then
> we will have a hard time to migrate from 2.11 to 2.10.
Right such a rework could break migration.
> All that said, I believe we can live without unit testing for a little
> longer and if
> we're going for this Physical/DRC refactoring, we need to push it for 2.10.
> We can
> think about unit test later with the refactored code. Feel free to send to
> me any
> unfinished/beta DRC refactoring code you might be working on and want
> tested. I can help in the refactoring too, just let me know.
So like you I think getting it into 2.10 would be a good idea, before
we have any released version with DRC migration to break.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-06-02 7:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 1:52 [Qemu-devel] [PATCH 0/4] spapr:DRC cleanups (part I) David Gibson
2017-06-01 1:52 ` [Qemu-devel] [PATCH 1/4] spapr: Move DRC RTAS calls into spapr_drc.c David Gibson
2017-06-01 13:36 ` Laurent Vivier
2017-06-01 16:05 ` Michael Roth
2017-06-02 3:21 ` David Gibson
2017-06-01 15:56 ` Michael Roth
2017-06-02 3:24 ` David Gibson
2017-06-01 16:08 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-06-01 1:52 ` [Qemu-devel] [PATCH 2/4] spapr: Abolish DRC get_fdt method David Gibson
2017-06-01 14:01 ` Laurent Vivier
2017-06-01 16:09 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-06-01 1:52 ` [Qemu-devel] [PATCH 3/4] spapr: Abolish DRC set_configured method David Gibson
2017-06-01 15:13 ` Laurent Vivier
2017-06-01 15:37 ` Michael Roth
2017-06-02 3:31 ` David Gibson
2017-06-01 16:14 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-06-01 1:52 ` [Qemu-devel] [PATCH 4/4] spapr: Make DRC get_index and get_type methods into plain functions David Gibson
2017-06-01 15:19 ` Laurent Vivier
2017-06-01 4:06 ` [Qemu-devel] [PATCH 0/4] spapr:DRC cleanups (part I) Bharata B Rao
2017-06-01 4:21 ` David Gibson
2017-06-01 4:25 ` Michael Roth
2017-06-01 5:30 ` David Gibson
2017-06-01 15:41 ` [Qemu-devel] [Qemu-ppc] " Daniel Henrique Barboza
2017-06-02 3:35 ` David Gibson [this message]
2017-06-01 13:41 ` Daniel Henrique Barboza
2017-06-02 3:49 ` [Qemu-devel] " David Gibson
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=20170602033541.GM13397@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=bharata@linux.vnet.ibm.com \
--cc=danielhb@linux.vnet.ibm.com \
--cc=lvivier@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sursingh@redhat.com \
/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).