mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Zhenzhong Duan <zhenzhong.duan@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	SRINIVAS <srinivas.eeda@oracle.com>
Subject: Re: Question about qspinlock nest
Date: Thu, 10 Jan 2019 09:43:47 -0500	[thread overview]
Message-ID: <910e9fb6-d0df-4711-fe2b-244b3c20eb82@redhat.com> (raw)
In-Reply-To: <e784a592-5dec-b0b3-6c70-d9ef775621d5@oracle.com>

On 01/10/2019 03:02 AM, Zhenzhong Duan wrote:
> Hi Maintainer,
>
>
> There is a question confused me for days. Appreciate an answer.
>
> In below code, the comment says we never have more than 4 nested
> contexts.
>
> What happen if debug and mce exceptions nest with the four, or we
> ensure it never happen?
>
>
> /*
>  * Per-CPU queue node structures; we can never have more than 4 nested
>  * contexts: task, softirq, hardirq, nmi.
>  *
>  * Exactly fits one 64-byte cacheline on a 64-bit architecture.
>  *
>  * PV doubles the storage and uses the second cacheline for PV state.
>  */
> static DEFINE_PER_CPU_ALIGNED(struct qnode, qnodes[MAX_NODES]);
>
Yes, both debug and mce exceptions are some kind of NMIs. So
theoretically, it is possible to have more than four. Are you aware of
any debug and MCE exception handlers that need to take a spinlock for
synchronization?

Cheers,
Longman



  reply	other threads:[~2019-01-10 14:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  8:02 Zhenzhong Duan
2019-01-10 14:43 ` Waiman Long [this message]
2019-01-10 18:25   ` James Morse
2019-01-10 19:23     ` Waiman Long
2019-01-10 20:12     ` Peter Zijlstra
2019-01-11 18:32       ` James Morse
2019-01-14 13:16         ` Peter Zijlstra
2019-01-14 13:54           ` James Morse
2019-01-14 21:07             ` Waiman Long
2019-01-18 10:02             ` Peter Zijlstra
2019-01-18 10:24               ` Borislav Petkov
2019-01-18 14:50               ` Waiman Long
2019-01-18 20:06                 ` Peter Zijlstra
2019-01-18 21:30                   ` Waiman Long
     [not found]   ` <2eca6f60-3e8b-a389-27cb-8adbd9676607@oracle.com>
2019-01-11  9:16     ` Peter Zijlstra
2019-01-11 17:36       ` Borislav Petkov
2019-01-11 16:59     ` Waiman Long
2019-01-10 20:03 ` Peter Zijlstra
2019-01-14  9:25 Zhenzhong Duan

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=910e9fb6-d0df-4711-fe2b-244b3c20eb82@redhat.com \
    --to=longman@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=srinivas.eeda@oracle.com \
    --cc=zhenzhong.duan@oracle.com \
    /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®