From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH v1 2/8]: PVH mmu changes
Date: Thu, 4 Oct 2012 11:27:34 -0700 [thread overview]
Message-ID: <20121004112734.4f003584@mantra.us.oracle.com> (raw)
In-Reply-To: <1349339279.650.214.camel@zakaz.uk.xensource.com>
On Thu, 4 Oct 2012 09:27:59 +0100
Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Wed, 2012-10-03 at 23:29 +0100, Mukesh Rathor wrote:
> > On Wed, 3 Oct 2012 16:42:43 +0100
> > Ian Campbell <Ian.Campbell@citrix.com> wrote:
> >
> > >
> > > > int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
> > > > unsigned long addr,
> > > > unsigned long mfn, int nr,
> > > > - pgprot_t prot, unsigned domid);
> > > > + pgprot_t prot, unsigned domid,
> > > > + struct xen_pvh_pfn_info *pvhp);
> > > > +int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
> > > > + struct xen_pvh_pfn_info *pvhp);
> > > > +
> > > > +struct xen_pvh_pfn_info {
> > >
> > > Can we call this xen_remap_mfn_info or something? PVH is x86
> > > specific while this struct is also useful on ARM.
> >
> > I already renamed it to: xen_xlat_pfn_info.
>
> What does xlat refer to here? I don't think we translate anything with
> this struct.
paging mode xlate! See stefanno's prev email where he suggested changing
name to this.
> > > > + struct page **pi_paga; /* pfn info page
> > > > array */
> > >
> > > can we just call this "pages"? paga is pretty meaningless.
> >
> > page array! i can rename page_array or page_a.
>
> What's wrong with pages? It's short (some of the lines using this
> stuff are necessarily pretty long) and obvious.
grep'ing pages would give thousands results. I can prefix with something
and use pages.
> > > > + int pi_num_pgs;
> > > > + int pi_next_todo;
> > >
> > > I don't think we need the pi_ prefix for any of these.
> >
> > The prefix for fields in struct make it easy to find via cscope or
> > grep, otherwise, it's a nightmare to find common field names like
> > pages when reading code. I really get frustrated. I prefer prefixing
> > all field names.
>
> It's not common practice in Linux to do so but fair enough.
>
> While implementing the ARM version of this interface it occurred to me
> that the num_pgs and next_todo fields here are not really needed
> across the arch interface e.g. you already get pi_num_pgs from the nr
> argument to xen_remap_domain_mfn_range and pi_next_todo is really
> state which fits in struct pvh_remap_data. That would mean that
> remap_foo could take a struct page * directly and I think you would
> save an allocation.
Ok, let me explore this.
thanks
Mukesh
next prev parent reply other threads:[~2012-10-04 18:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 19:15 [PATCH v1 2/8]: PVH mmu changes Mukesh Rathor
2012-09-24 11:55 ` Stefano Stabellini
2012-09-24 12:16 ` Ian Campbell
2012-09-24 12:24 ` Stefano Stabellini
2012-09-26 0:27 ` Mukesh Rathor
2012-09-26 11:10 ` George Dunlap
2012-09-26 11:16 ` Stefano Stabellini
2012-09-24 13:50 ` Konrad Rzeszutek Wilk
2012-09-26 0:09 ` Mukesh Rathor
2012-09-26 11:15 ` Stefano Stabellini
2012-10-01 21:32 ` Mukesh Rathor
2012-10-01 21:44 ` Mukesh Rathor
2012-10-02 11:23 ` Stefano Stabellini
2012-10-02 22:22 ` Mukesh Rathor
2012-10-02 10:46 ` Stefano Stabellini
2012-10-03 18:27 ` Mukesh Rathor
2012-10-04 8:18 ` Ian Campbell
2012-09-24 14:04 ` Stefano Stabellini
2012-09-24 14:13 ` Ian Campbell
2012-09-26 0:33 ` Mukesh Rathor
2012-09-26 11:25 ` Stefano Stabellini
2012-09-26 13:54 ` Konrad Rzeszutek Wilk
2012-10-02 10:49 ` Stefano Stabellini
2012-10-03 15:42 ` Ian Campbell
2012-10-03 22:29 ` Mukesh Rathor
2012-10-04 8:27 ` Ian Campbell
2012-10-04 18:27 ` Mukesh Rathor [this message]
2012-10-04 18:42 ` Konrad Rzeszutek Wilk
2012-10-05 9:25 ` Ian Campbell
2012-10-06 2:00 ` Mukesh Rathor
2012-10-08 9:31 ` Ian Campbell
2012-10-04 8:31 ` Ian Campbell
2012-10-05 1:17 ` Mukesh Rathor
2012-10-05 9:26 ` Ian Campbell
2012-10-04 13:54 ` Ian Campbell
2012-10-05 1:51 ` Mukesh Rathor
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=20121004112734.4f003584@mantra.us.oracle.com \
--to=mukesh.rathor@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=Xen-devel@lists.xensource.com \
--cc=konrad.wilk@oracle.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).