From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
imirkin@alum.mit.edu, efault@gmx.de, michel@daenzer.net,
konrad.wilk@oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v2
Date: Tue, 2 Jan 2018 17:14:17 +0100 [thread overview]
Message-ID: <07fe9849-fa83-0d5c-21d5-18c15ed6596c@gmail.com> (raw)
In-Reply-To: <151490759196.21495.9033629958966748437@mail.alporthouse.com>
Am 02.01.2018 um 16:39 schrieb Chris Wilson:
> Quoting Christian König (2018-01-02 12:13:58)
>> TTM tries to allocate coherent memory in chunks of 2MB first to improve
>> TLB efficiency and falls back to allocating 4K pages if that fails.
>>
>> Suppress the warning when the 2MB allocations fails since there is a
>> valid fall back path.
>>
>> v2: suppress warnings from swiotlb_tbl_map_single as well
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Reported-by: Mike Galbraith <efault@gmx.de>
>> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104082
>> CC: stable@vger.kernel.org
>> ---
>> @@ -989,7 +1002,8 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
>> if (swiotlb_force == SWIOTLB_FORCE ||
>> !dma_capable(hwdev, dev_addr, sg->length)) {
>> phys_addr_t map = map_single(hwdev, sg_phys(sg),
>> - sg->length, dir, attrs);
>> + sg->length, dir, attrs,
>> + true);
> This keeps the warning for dma_map_sg(), so seems quite ineffective.
That is the desired result, dma_map_sg() should still print the warning.
We only want to disable it for swiotlb_alloc_coherent().
Regards,
Christian.
>
>> if (map == SWIOTLB_MAP_ERROR) {
>> /* Don't panic here, we expect map_sg users
>> to do proper error handling. */
> And counter to the suggestion here?
We don't use swiotlb_map_sg_attrs() in TTM, so that is irrelevant for my
use case and I can't test any change regarding it.
Regards,
Christian.
> -Chris
next prev parent reply other threads:[~2018-01-02 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 12:13 [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v2 Christian König
2018-01-02 14:04 ` Mike Galbraith
2018-01-02 15:39 ` Chris Wilson
2018-01-02 16:14 ` Christian König [this message]
2018-01-02 20:51 ` Konrad Rzeszutek Wilk
2018-01-03 10:09 ` Christian König
2018-01-04 17:42 ` kbuild test robot
2018-01-04 17:42 ` [RFC PATCH] swiotlb: _swiotlb_tbl_map_single() can be static kbuild test robot
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=07fe9849-fa83-0d5c-21d5-18c15ed6596c@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=chris@chris-wilson.co.uk \
--cc=christian.koenig@amd.com \
--cc=efault@gmx.de \
--cc=imirkin@alum.mit.edu \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michel@daenzer.net \
/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