From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: "Taylor, Neal E" <Neal.Taylor@ca.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
"Kalev, Leonid" <Leonid.Kalev@ca.com>,
Tushar N Dave <tushar.n.dave@intel.com>,
Jan Beulich <JBeulich@suse.com>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>
Subject: Re: Buffers not reachable by PCI
Date: Wed, 14 Dec 2011 22:29:38 -0400 [thread overview]
Message-ID: <20111215022938.GA16031@andromeda.dapyr.net> (raw)
In-Reply-To: <3E243B26F475504B9BB0BCC9728B0DA629E18EBF@USILMS110A.ca.com>
On Thu, Dec 15, 2011 at 02:19:55AM +0000, Taylor, Neal E wrote:
> Missed this when I was composing the previous e-mail. Your answer is here. Thank you.
>
Can I put 'Tested-by: Neal ..' on this patch:
> >From 47409eecc08effe20fc4aa0da899dd6ac475cb0b Mon Sep 17 00:00:00 2001
> From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Date: Wed, 14 Dec 2011 20:48:01 -0500
> Subject: [PATCH] xen/swiotlb: Use page alignment for early buffer allocation.
>
> This piggybacks on git commit e79f86b2ef9c0a8c47225217c1018b7d3d90101c
> "swiotlb: Use page alignment for early buffer allocation" which:
>
> "We could call free_bootmem_late() if swiotlb is not used, and
> it will shrink to page alignment.
>
> So alloc them with page alignment at first, to avoid lose two pages"
>
> Reported-by: "Kalev, Leonid" <Leonid.Kalev@ca.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> drivers/xen/swiotlb-xen.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
> index 8e964b9..5c8e445 100644
> --- a/drivers/xen/swiotlb-xen.c
> +++ b/drivers/xen/swiotlb-xen.c
> @@ -166,7 +166,8 @@ retry:
> /*
> * Get IO TLB memory from any location.
> */
> - xen_io_tlb_start = alloc_bootmem(bytes);
> + xen_io_tlb_start = alloc_bootmem_pages(PAGE_ALIGN(bytes));
> +
> if (!xen_io_tlb_start) {
> m = "Cannot allocate Xen-SWIOTLB buffer!\n";
> goto error;
> @@ -179,7 +180,7 @@ retry:
> bytes,
> xen_io_tlb_nslabs);
> if (rc) {
> - free_bootmem(__pa(xen_io_tlb_start), bytes);
> + free_bootmem(__pa(xen_io_tlb_start), PAGE_ALIGN(bytes));
> m = "Failed to get contiguous memory for DMA from Xen!\n"\
> "You either: don't have the permissions, do not have"\
> " enough free memory under 4GB, or the hypervisor memory"\
> --
> 1.7.1
next prev parent reply other threads:[~2011-12-15 2:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 20:19 Buffers not reachable by PCI Taylor, Neal E
2011-12-09 20:30 ` Konrad Rzeszutek Wilk
2011-12-12 22:11 ` Taylor, Neal E
2011-12-13 0:19 ` Konrad Rzeszutek Wilk
2011-12-13 19:34 ` Taylor, Neal E
2011-12-13 22:17 ` Taylor, Neal E
2011-12-13 23:28 ` Konrad Rzeszutek Wilk
2011-12-14 0:38 ` Taylor, Neal E
2011-12-14 9:20 ` Jan Beulich
2011-12-14 16:42 ` Taylor, Neal E
2011-12-14 18:42 ` Kalev, Leonid
2011-12-15 1:59 ` Konrad Rzeszutek Wilk
2011-12-15 2:19 ` Taylor, Neal E
2011-12-15 2:29 ` Konrad Rzeszutek Wilk [this message]
2011-12-15 2:40 ` Taylor, Neal E
2011-12-15 16:12 ` Konrad Rzeszutek Wilk
2011-12-15 16:14 ` Taylor, Neal E
2011-12-15 2:16 ` Taylor, Neal E
2011-12-14 19:11 ` Konrad Rzeszutek Wilk
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=20111215022938.GA16031@andromeda.dapyr.net \
--to=konrad@darnok.org \
--cc=JBeulich@suse.com \
--cc=Leonid.Kalev@ca.com \
--cc=Neal.Taylor@ca.com \
--cc=konrad.wilk@oracle.com \
--cc=tushar.n.dave@intel.com \
--cc=xen-devel@lists.xensource.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 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.