From: "Christian König" <christian.koenig@amd.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Alex Deucher <alexander.deucher@amd.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
amd-gfx@lists.freedesktop.org, linux-mm@kvack.org,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
Pedro Falcato <pfalcato@suse.de>
Subject: Re: [PATCH v3 3/3] amdgpu: don't report an error if the process was killed
Date: Thu, 8 Jan 2026 10:10:02 +0100 [thread overview]
Message-ID: <d9fa9b92-c4ac-406a-ad05-8942056088fd@amd.com> (raw)
In-Reply-To: <vaq2ys4tsyggohbbypf6l2eobp22t47rtmgjl53zu7p2xgcezd@5wtd7q3wo5ng>
On 1/5/26 19:20, Liam R. Howlett wrote:
> * Mikulas Patocka <mpatocka@redhat.com> [260104 16:18]:
>> If the process was killed by a fatal signal, amdgpu_hmm_register could
>> return -EINTR (the -EINTR comes from mm_take_all_locks).
>>
>> Don't log the error in this case, because no error happened.
>>
>> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
>>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 +++++++--
>> 1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> Index: mm/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> ===================================================================
>> --- mm.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2026-01-04 21:19:14.000000000 +0100
>> +++ mm/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2026-01-04 21:19:14.000000000 +0100
>> @@ -1070,8 +1070,13 @@ static int init_user_pages(struct kgd_me
>>
>> ret = amdgpu_hmm_register(bo, user_addr);
>> if (ret) {
>> - pr_err("%s: Failed to register MMU notifier: %d\n",
>> - __func__, ret);
>> + /*
>> + * If we got EINTR because the process was killed, don't report
>> + * it, because no error happened.
>> + */
>> + if (!(fatal_signal_pending(current) && ret == -EINTR))
>> + pr_err("%s: Failed to register MMU notifier: %d\n",
>> + __func__, ret);
>
> Masking off error messages will make the message less useful and harder
> to debug.
Reporting errors on -EINTR and -ERESTARTSYS are usually considered a bug since that are perfectly normal conditions to occur.
> You could also change the log level, which might be more desirable for a
> whole lot of the messages in here?
Well I agree that debug or info level is probably more suitable, but error messages like this here are just a symptom that people doesn't know how to properly use ftrace.
In other words when you have a message in syslog that userspace did something wrong, even if it's just a debug message, than that is in like 99% of all cases not appropriate.
What drivers should log is things like HW conditions changes, global SW condition changes because somebody requested feature X, performance changes because of I have to enable workaround Y...... but not system call is interrupted by signal, application is using to much memory or giving invalid values etc....
Regards,
Christian.
>
> Thanks,
> Liam
prev parent reply other threads:[~2026-01-08 9:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-04 21:17 Mikulas Patocka
2026-01-05 9:06 ` Christian König
2026-01-05 11:41 ` Lorenzo Stoakes
2026-01-07 20:29 ` Mikulas Patocka
2026-01-07 22:05 ` David Hildenbrand (Red Hat)
2026-01-05 12:13 ` Lorenzo Stoakes
2026-01-05 18:20 ` Liam R. Howlett
2026-01-08 9:10 ` 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=d9fa9b92-c4ac-406a-ad05-8942056088fd@amd.com \
--to=christian.koenig@amd.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=david@redhat.com \
--cc=jannh@google.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mpatocka@redhat.com \
--cc=pfalcato@suse.de \
--cc=vbabka@suse.cz \
/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