From: "Christian König" <christian.koenig@amd.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
linux-kernel@vger.kernel.org
Cc: Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set.
Date: Tue, 19 Dec 2017 19:06:43 +0100 [thread overview]
Message-ID: <58a552e3-b730-2417-b16c-adde61812e79@amd.com> (raw)
In-Reply-To: <BA0FE1EC-F17E-4AA3-80BA-10357E8C8B95@oracle.com>
Am 19.12.2017 um 15:52 schrieb Konrad Rzeszutek Wilk:
> On December 19, 2017 9:32:55 AM EST, "Christian König" <ckoenig.leichtzumerken@gmail.com> wrote:
>> 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.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
> Is there an Reported by or such needed?
Sorry my fault not to include that.
Reported-by: Mike Galbraith <efault@gmx.de>.
>> ---
>> lib/swiotlb.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
>> index cea19aaf303c..63a44fb29ce6 100644
>> --- a/lib/swiotlb.c
>> +++ b/lib/swiotlb.c
>> @@ -769,9 +769,11 @@ swiotlb_alloc_coherent(struct device *hwdev,
>> size_t size,
>> return ret;
>>
>> err_warn:
>> - pr_warn("swiotlb: coherent allocation failed for device %s
>> size=%zu\n",
>> - dev_name(hwdev), size);
>> - dump_stack();
>> + if (!(flags & __GFP_NOWARN)) {
>> + pr_warn("swiotlb: coherent allocation failed for device %s
>> size=%zu\n",
>> + dev_name(hwdev), size);
>> + dump_stack();
>> + }
> Ok, let me queue it up.
Thanks,
Christian.
>> return NULL;
>> }
prev parent reply other threads:[~2017-12-19 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 14:32 Christian König
2017-12-19 14:52 ` Konrad Rzeszutek Wilk
2017-12-19 18:06 ` Christian König [this message]
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=58a552e3-b730-2417-b16c-adde61812e79@amd.com \
--to=christian.koenig@amd.com \
--cc=efault@gmx.de \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®