qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/4] spapr:DRC cleanups (part I)


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 0/4] spapr:DRC cleanups (part I)
Date: Thu, 1 Jun 2017 15:30:37 +1000
User-agent: Mutt/1.8.0 (2017-02-23)

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.

> I also don't think we should expose DRC internal fields to
> outside callers (which attach/detach would involve).

Well.. just changing attach/detach to plain functions instead of
methods wouldn't break that.

> This
> series does that to some extent with the RTAS calls, but
> since those are now moved to spapr_drc.c it makes more sense.

Right - the semantics of the RTAS calls are tied closely to the DRC
semantics, so I don't think there's any point considering the RTAS
calls to be "outside" the DRC code itself.

-- 
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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]