All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Oleksii Kurochko <oleksii.kurochko@gmail.com>,
	Roger Pau Monne <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.19?] xen/x86: pretty print interrupt CPU affinity masks
Date: Fri, 17 May 2024 09:39:34 +0200	[thread overview]
Message-ID: <c943807b-f5dd-4e46-aac3-a519c4051f4f@suse.com> (raw)
In-Reply-To: <06844367-cc1d-42f7-b925-ba78b4532b11@citrix.com>

On 16.05.2024 19:13, Andrew Cooper wrote:
> On 15/05/2024 4:29 pm, Roger Pau Monne wrote:
>> Print the CPU affinity masks as numeric ranges instead of plain hexadecimal
>> bitfields.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> ---
>>  xen/arch/x86/irq.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
>> index 80ba8d9fe912..3b951d81bd6d 100644
>> --- a/xen/arch/x86/irq.c
>> +++ b/xen/arch/x86/irq.c
>> @@ -1934,10 +1934,10 @@ void do_IRQ(struct cpu_user_regs *regs)
>>                  if ( ~irq < nr_irqs && irq_desc_initialized(desc) )
>>                  {
>>                      spin_lock(&desc->lock);
>> -                    printk("IRQ%d a=%04lx[%04lx,%04lx] v=%02x[%02x] t=%s s=%08x\n",
>> -                           ~irq, *cpumask_bits(desc->affinity),
>> -                           *cpumask_bits(desc->arch.cpu_mask),
>> -                           *cpumask_bits(desc->arch.old_cpu_mask),
>> +                    printk("IRQ%d a={%*pbl}[{%*pbl},{%*pbl}] v=%02x[%02x] t=%s s=%08x\n",
> 
> Looking at this more closely, there's still some information obfuscation
> going on.
> 
> How about "... a={} o={} n={} v=..."
> 
> so affinity, old and new masks are all stated explicitly, instead of
> having to remember what the square brackets mean, and in particular that
> the masks are backwards?

Just one question: Why put old ahead of new? Aiui that's what you refer to
with "backwards", yet I don't see what's backwards about it. Old would
possibly matter only when the IRQ was recently moved, whereas new (actually:
Why "new"?) would matter at all times. I'd see "... a={} m={} o={} v=..."
as more appropriate.

Jan


      parent reply	other threads:[~2024-05-17  7:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 15:29 [PATCH for-4.19?] xen/x86: pretty print interrupt CPU affinity masks Roger Pau Monne
2024-05-15 15:30 ` Andrew Cooper
2024-05-16 16:06   ` Oleksii K.
2024-05-16 17:13 ` Andrew Cooper
2024-05-17  6:58   ` Roger Pau Monné
2024-05-17  7:39   ` Jan Beulich [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=c943807b-f5dd-4e46-aac3-a519c4051f4f@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.