[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 2/2] x86: add accessors for scratch cpu mask


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 28 Feb 2020 12:41:06 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 28 Feb 2020 11:41:24 +0000
  • Ironport-sdr: AlcSqPPcRn1subXi/c8V74NRqrlXexR9Z4zk2kCcuVYzbVb624AzsKjAm1sp+qFgv6CirD5vaX lTmYc5UHYn6EHy4rpoGRfb39HwA+K4u+anjj0JZGt7v6ShPjvfz/UIFUrH5hyRnHVWbDSdzX3a cOfXgXxAgP7IHnqDdI2R7o15D/zespHOT1m9Z6yLWUFaagSNVUWx96B5zxsq8JmolF/WWmbIMi EWX0NK8NvtkVyqVVPj+kPXlc9kA7wxrp41F7HkL+YLdGCFnHVAKWbg8POTezxm6FGjupRlINvu zjs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Feb 28, 2020 at 12:15:21PM +0100, Jan Beulich wrote:
> On 28.02.2020 11:31, Roger Pau Monné wrote:
> > On Fri, Feb 28, 2020 at 11:16:55AM +0100, Jan Beulich wrote:
> >> On 28.02.2020 10:33, Roger Pau Monne wrote:
> >>> +    /*
> >>> +     * Due to reentrancy scratch cpumask cannot be used in IRQ, #MC or 
> >>> #NMI
> >>> +     * context.
> >>> +     */
> >>> +    BUG_ON(in_irq() || in_mce_handler() || in_nmi_handler());
> >>> +
> >>> +    if ( use && unlikely(this_cpu(scratch_cpumask_use)) )
> >>> +    {
> >>> +        printk("scratch CPU mask already in use by %ps (%p)\n",
> >>> +               this_cpu(scratch_cpumask_use), 
> >>> this_cpu(scratch_cpumask_use));
> >>
> >> Why the raw %p as well? We don't do so elsewhere, I think. Yes,
> >> it's debugging code only, but I wonder anyway.
> > 
> > I use addr2line to find the offending line, and it's much easier to do
> > so if you have the address directly, rather than having to use nm in
> > order to figure out the address of the symbol and then add the offset.
> > 
> > Maybe I'm missing some other way to do this more easily?
> 
> In such a case we may want to consider making %ps (and %pS)
> print a hex presentation next to the decoded one, in debug
> builds at least. Andrew, thoughts? (There may be cases where
> this is not wanted, bit if we made this a debug mode only
> feature, I think it wouldn't do too much harm.)

If you agree to make %p[sS] print the address then I can drop this
and send a patch to that effect (likely next week).

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.