From: Tim Deegan Subject: Re: [PATCH v6 1/4] xen: introduce a helper to allocate non-contiguous memory Date: Thu, 14 May 2015 10:38:26 +0100 Message-ID: <20150514093826.GB81528@deinos.phlegethon.org> References: <1431354328-30453-1-git-send-email-roger.pau@citrix.com> <1431354328-30453-2-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yspb4-0002kb-Ve for xen-devel@lists.xenproject.org; Thu, 14 May 2015 09:38:31 +0000 Content-Disposition: inline In-Reply-To: <1431354328-30453-2-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: xen-devel@lists.xenproject.org, Stefano Stabellini , Ian Campbell , Jan Beulich , Andrew Cooper List-Id: xen-devel@lists.xenproject.org At 16:25 +0200 on 11 May (1431361525), Roger Pau Monne wrote: > The allocator uses independent calls to alloc_domheap_pages in order to g= et > the desired amount of memory and then maps all the independent physical > addresses into a contiguous virtual address space. > = > Signed-off-by: Roger Pau Monn=E9 > Tested-by: Julien Grall (ARM) [...] > +void *vzalloc(size_t size) > +{ > + void *p =3D vmalloc(size); > + > + return p ? memset(p, 0, size) : p; > +} Should this be using clear_page()? Our plain memset() is not optimized for SSE &c. Apart from that, this patch looks very nice indeed. Cheers, Tim.