From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 4/7] efi_loader: Track size of pool allocations to allow freeing
Date: Mon, 10 Oct 2016 13:39:54 +0200 [thread overview]
Message-ID: <57FB7E0A.6040604@suse.de> (raw)
In-Reply-To: <a9c2dfd819b44ebeb89bf46cec7dcd68@rwthex-w2-b.rwth-ad.de>
On 10/09/2016 10:17 PM, Stefan Br?ns wrote:
> We need a functional free_pool implementation, as otherwise each
> allocate_pool causes growth of the memory descriptor table.
>
> Different to free_pages, free_pool does not provide the size for the
> to be freed allocation, thus we have to track the size ourselves.
>
> As the only EFI requirement for pool allocation is an alignment of
> 8 bytes, we can keep allocating a range using the page allocator,
> reserve the first 8 bytes for our bookkeeping and hand out the
> remainder to the caller. This saves us from having to use any
> independent data structures for tracking.
>
> To simplify the conversion between pool allocations and the corresponding
> page allocation, we create an auxiliary struct efi_pool_allocation.
>
> Given the allocation size free_pool size can handoff freeing the page
> range, which was indirectly allocated by a call to allocate_pool,
> to free_pages.
>
> Signed-off-by: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Alex
next prev parent reply other threads:[~2016-10-10 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20161001213229.19522-5-stefan.bruens@rwth-aachen.de>
2016-10-09 20:17 ` [U-Boot] [PATCH v4 4/7] efi_loader: Track size of pool allocations to allow freeing Stefan Brüns
2016-10-10 11:39 ` Alexander Graf [this message]
2016-10-13 14:34 ` [U-Boot] [U-Boot, v4, " Alexander Graf
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=57FB7E0A.6040604@suse.de \
--to=agraf@suse.de \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.