lkml.org 
[lkml]   [2014]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] efi: Capsule update support
On Fri, 10 Oct, at 08:28:47PM, Borislav Petkov wrote:
>
> You have efi_capsule_update() vs efi_update_capsule(). Maybe change the
> names a bit more for differentiation. Or prepend the workhorse doing all
> the work with "__" or so...

Yeah, I really didn't come up with a great naming scheme here. I'll fix
that.

> > +
> > + for (i = 0; i < nr_block_pgs; i++) {
> > + block_pgs[i] = alloc_page(GFP_KERNEL);
>
> Maybe alloc_pages() once we verify that it actually gives phys. contig.
> memory and maybe also try to do it outside of the locked region. I don't
> know if it would matter to drop the locks though as capsule updating is
> not something you do pretty often. I'd hope!

Actually, I'm not bothered about getting physically contiguous memory
because we pass a scatter gather list to the firmware anyway. What I was
looking for was to avoid doing high order allocations when we don't
really need them (lots of low order allocs are fine).

Right, allocating under the lock isn't a great idea. I'll take a look at
reworking this to do the allocation up front.

--
Matt Fleming, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2014-10-15 00:21    [W:0.115 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site