From: yong.wu@mediatek.com (Yong Wu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] iommu/dma: Avoid unlikely high-order allocations
Date: Tue, 19 Jan 2016 10:55:00 +0800 [thread overview]
Message-ID: <1453172100.17894.9.camel@mhfsdcap03> (raw)
In-Reply-To: <CAD=FV=WqJHjb3zoZn=8OPO2iKH1k1sMvXkVBkyM6pAyvo6PgDQ@mail.gmail.com>
On Fri, 2015-12-18 at 14:35 -0800, Doug Anderson wrote:
> Robin,
>
> On Fri, Dec 18, 2015 at 9:01 AM, Robin Murphy <robin.murphy@arm.com> wrote:
> > Doug reports that the equivalent page allocator on 32-bit ARM exhibits
> > particularly pathalogical behaviour under memory pressure when
> > fragmentation is high, where allocating a 4MB buffer takes tens of
> > seconds and the number of calls to alloc_pages() is over 9000![1]
> >
> > We can drastically improve that situation without losing the other
> > benefits of high-order allocations when they would succeed, by assuming
> > memory pressure is relatively constant over the course of an allocation,
> > and not retrying allocations at orders we know to have failed before.
> > This way, the best-case behaviour remains unchanged, and in the worst
> > case we should see at most a dozen or so (MAX_ORDER - 1) failed attempts
> > before falling back to single pages for the remainder of the buffer.
> >
> > [1]:http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/394660.html
> >
> > Reported-by: Douglas Anderson <dianders@chromium.org>
> > Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> > ---
> > drivers/iommu/dma-iommu.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
>
> Presumably it makes sense to update this based on v2 of my patch to
> the original code? AKA: <https://patchwork.kernel.org/patch/7888851/>
> ?
Hi Robin,
Thanks very much for this patch.
And Douglas has sent his v2 which improve the flow of alloc_pages.
Do you have any plan to update this patch according to this v2, or any
concern about it?
> _______________________________________________
> iommu mailing list
> iommu at lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2016-01-19 2:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 17:01 [PATCH 1/3] iommu/dma: Add some missing #includes Robin Murphy
2015-12-18 17:01 ` [PATCH 2/3] iommu/dma: Use correct offset in map_sg Robin Murphy
2015-12-28 16:05 ` Joerg Roedel
2016-01-04 16:08 ` Robin Murphy
2016-01-04 16:19 ` [PATCH RESEND] " Robin Murphy
2016-01-07 12:38 ` Joerg Roedel
2016-03-09 7:50 ` [PATCH 2/3] " Magnus Damm
2016-03-09 15:00 ` Robin Murphy
2016-03-10 7:47 ` Magnus Damm
2015-12-18 17:01 ` [PATCH 3/3] iommu/dma: Avoid unlikely high-order allocations Robin Murphy
2015-12-18 22:35 ` Doug Anderson
2016-01-19 2:55 ` Yong Wu [this message]
2015-12-28 16:08 ` [PATCH 1/3] iommu/dma: Add some missing #includes Joerg Roedel
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=1453172100.17894.9.camel@mhfsdcap03 \
--to=yong.wu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox