LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>,
	x86@kernel.org
Subject: Re: [tip: x86/splitlock] Documentation/x86: Add buslock.rst
Date: Thu, 19 Aug 2021 11:36:18 +0800	[thread overview]
Message-ID: <aeb1d99d-6651-c0ff-a7bd-f006518080e2@intel.com> (raw)
In-Reply-To: <YR0o5olwUq765pS4@otcwcpicx3.sc.intel.com>

On 8/18/2021 11:36 PM, Fenghua Yu wrote:
> On Wed, Aug 18, 2021 at 09:59:49AM +0800, Xiaoyao Li wrote:
>> On 5/18/2021 10:44 PM, tip-bot2 for Fenghua Yu wrote:
>> I'm wonder if using only one "split_lock_detect" parameter for those two
>> features is good/correct.
>>
>> In fact, split lock is just one type of bus lock. There are two types bus
>> lock:
>> 1) split lock, lock on WB memory across multiple cache lines;
>> 2) lock on non-WB memory;
>>
>> As current design, if both features are available, it only enables #AC for
>> split lock either for "warn" or "fatal". Thus we cannot capture any bus lock
>> due to 2) lock on non-WB memory.
>>
>> Why not provide separate parameter for them? e.g., split_lock_detect and
>> bus_lock_detect. Then they can be configured and enabled independently.
> 
> #AC for split lock is a model specific feature and only available on limited
> (and legacy) platforms. #DB for bus lock is an architectural feature and will
> replace #AC for split lock in future platforms. The platforms that support
> both of them are very rare (maybe only one AFAIK). 

I suppose you mean only SPR supports both.

> Adding two parameters makes
> code and usage complex while only one platform may get benefit in reality.

First, it's about correctness not easiness. Administrator wants to kill 
any user application that causes bus lock so setting 
"split_lock_detect=fatal". But it's possible that all non-WB bus lock 
escapes if the platform supports both feature.

(Yes, the parameter is called "split_lock_detect". It's no surprising 
that it can only detects split lock.)

Second, I don't think using two separate parameters makes code and usage 
complex. e.g.,

   - "split_lock_detect" for split lock feature, it can be
     [off|fatal|warn]
   - "bus_lock_detect" for bus lock feature, it can be
     [off|fatal|warn|ratelimit]

   Of course, kernel can print a message like "split/bus lock detection
   is not supported by silicon" when feature is not available.

Both features can work independently, and every combination can work wit 
h no issue.

Users are suggested to use "bus_lock_detect" to detect all bus lock and 
leave "split_lock_detect" to whatever. Of course they can only use 
"split_lock_detect" while leaving "bus_lock_detect" to off, if they are 
only interested in split lock.

> Thanks.
> 
> -Fenghua
> 


  reply	other threads:[~2021-08-19  3:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 21:49 [PATCH 0/4] x86/bus_lock: Set rate limit for bus lock Fenghua Yu
2021-04-19 21:49 ` [PATCH 1/4] Documentation/x86: Add buslock.rst Fenghua Yu
2021-05-18 14:39   ` Thomas Gleixner
2021-05-18 14:44   ` [tip: x86/splitlock] " tip-bot2 for Fenghua Yu
2021-08-18  1:59     ` Xiaoyao Li
2021-08-18 15:36       ` Fenghua Yu
2021-08-19  3:36         ` Xiaoyao Li [this message]
2021-04-19 21:49 ` [PATCH 2/4] x86/bus_lock: Set rate limit for bus lock Fenghua Yu
2021-05-18 14:44   ` [tip: x86/splitlock] " tip-bot2 for Fenghua Yu
2021-04-19 21:49 ` [PATCH 3/4] Documentation/admin-guide: Change doc for bus lock ratelimit Fenghua Yu
2021-05-18 14:44   ` [tip: x86/splitlock] Documentation/admin-guide: Add " tip-bot2 for Fenghua Yu
2021-04-19 21:49 ` [PATCH 4/4] Documentation/x86: Add ratelimit in buslock.rst Fenghua Yu
2021-05-18 14:44   ` [tip: x86/splitlock] " tip-bot2 for Fenghua Yu
2021-05-17 18:46 ` [PATCH 0/4] x86/bus_lock: Set rate limit for bus lock Fenghua Yu
2021-05-17 19:01   ` Thomas Gleixner
2021-05-17 19:05     ` Fenghua Yu

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=aeb1d99d-6651-c0ff-a7bd-f006518080e2@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --subject='Re: [tip: x86/splitlock] Documentation/x86: Add buslock.rst' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).