linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: David Laight <David.Laight@ACULAB.COM>,
	'Anshuman Khandual' <anshuman.khandual@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH v6] mm: Uninline copy_overflow()
Date: Tue, 15 Feb 2022 08:42:09 +0100	[thread overview]
Message-ID: <1cf5c948-351c-d5ac-cba3-6ebd322fac77@csgroup.eu> (raw)
In-Reply-To: <3fb6ecb8-5c40-7ff4-4a55-7ea5ffad9962@csgroup.eu>



Le 14/02/2022 à 16:31, Christophe Leroy a écrit :
> 
> 
> Le 14/02/2022 à 16:10, David Laight a écrit :
>> From: Christophe Leroy
>>> Sent: 14 February 2022 14:58
>> ...
>>>> I make that 3 extra instructions.
>>>> Two are needed to load the format string.
>>>> Not sure why the third gets added.
>>>
>>> Third instruction is 'twui', to 'trap' and get the warning oops.
>>
>> I wondered what that did :-)
>> Although you really want the -- cut here -- to contain the pr_warn().
>> Doesn't WARN() do that for you?
> 
> I remember some discussion about that in the past. Will dig into it 
> tomorrow.
> 
>>
>> I was looking at that last week because the 'scheduling while atomic'
>> trace is "BUG: xxxx" but doesn't have the '--- cut here --" marker.
>>

So I looked at it. Both WARN_ON() and WARN() properly display the cut 
here line:

WARN(1, "Testing whether cut here is there");

	[   35.051548] ------------[ cut here ]------------
	[   35.051611] Testing whether cut here is there
	[   35.051665] WARNING: CPU: 0 PID: 358 at 
arch/powerpc/kernel/setup-common.c:330 show_cpuinfo+0x234/0x30c


WARN_ON(1);

	[   35.058987] ------------[ cut here ]------------
	[   35.059033] WARNING: CPU: 0 PID: 358 at 
arch/powerpc/kernel/setup-common.c:331 show_cpuinfo+0x2b0/0x30c


So yes WARN() prints the "cut here", but what the 'twui' provides you is 
everything else, the dump of all registers, call trace, instruction 
dump, etc ...

The 'twui' is after the call to __warn_printk() so everything is after 
the 'cut here'.

Then I'm not sure I understood your question.

The 'scheduling while atomic' is not generated by a WARN() but by a 
printk in function __schedule_bug() hence the absence of '--- cut here ---'

Thanks
Christophe


      reply	other threads:[~2022-02-15  7:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14  6:26 Christophe Leroy
2022-02-14  9:23 ` David Laight
2022-02-14  9:54 ` Anshuman Khandual
2022-02-14 11:31   ` David Laight
2022-02-14 13:21     ` Christophe Leroy
2022-02-14 14:00       ` David Laight
2022-02-14 14:57         ` Christophe Leroy
2022-02-14 15:10           ` David Laight
2022-02-14 15:31             ` Christophe Leroy
2022-02-15  7:42               ` Christophe Leroy [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=1cf5c948-351c-d5ac-cba3-6ebd322fac77@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=David.Laight@ACULAB.COM \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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