[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1508101356200.11337@kaball.uk.xensource.com>
Date: Mon, 10 Aug 2015 13:57:31 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: David Vrabel <david.vrabel@...rix.com>
CC: Stefano Stabellini <stefano.stabellini@...citrix.com>,
Julien Grall <julien.grall@...rix.com>,
<ian.campbell@...rix.com>, <linux-kernel@...r.kernel.org>,
<xen-devel@...ts.xenproject.org>,
"Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [Xen-devel] [PATCH v3 19/20] xen/privcmd: Add support for Linux
64KB page granularity
On Mon, 10 Aug 2015, David Vrabel wrote:
> On 10/08/15 13:03, Stefano Stabellini wrote:
> > On Fri, 7 Aug 2015, Julien Grall wrote:
> >> - rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap_range, &xatp);
> >> - return rc < 0 ? rc : err;
> >> + for (i = 0; i < nr_gfn; i++) {
> >> + if ((i % XEN_PFN_PER_PAGE) == 0) {
> >> + page = pages[i / XEN_PFN_PER_PAGE];
> >
> > If this function is going to be called very frequently you might want to
> > consider using a shift instead.
> >
> > page = pages[i >> 4];
> >
> > With an appropriate macro of course.
>
> This change isn't necessary. Compilers already turn divides into
> suitable shifts.
The ARM compiler I used last time I tested this did not, but that was 1
or 2 years ago. In any case to be clear this change is not required.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists