Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
From: 陈华才 <chenhc@lemote.com>
To: "Peter Zijlstra" <peterz@infradead.org>, huangpei <huangpei@loongson.cn>
Cc: ralf <ralf@linux-mips.org>, "paul.burton" <paul.burton@mips.com>,
	jhogan <jhogan@kernel.org>,
	"jiaxun.yang" <jiaxun.yang@flygoat.com>,
	linux-mips <linux-mips@vger.kernel.org>
Subject: Something about loongson_llsc_mb
Date: Sun, 1 Sep 2019 12:45:28 +0800
Message-ID: <tencent_34DDA31F622119EE5003B7F4@qq.com> (raw)
In-Reply-To: <20190831161247.GM2369@hirez.programming.kicks-ass.net>

Hi, Peter,

I found that this patch has been merged but I haven't received the e-mail for some unknown reasons.
https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=1c6c1ca318585f1096d4d04bc722297c85e9fb8a

Firstly, your comments are correct, so the barrier.h part is perfect.

Secondly, most of the rest is useless, because smp_mb__before_llsc, loongson_llsc_mb and other memory barriers are the same thing on Loongson-3. We don't need to add loongson_llsc_mb if there is already a smp_mb__before_llsc.

Thirdly, maybe the only exception is syscall.c, but mips_atomic_set is not used on Loongson-3. And if in some cases we use it, I think the user-to-kernel context switch has the same effect of a memory barrier.

Lastly, I think the real exception is test_and_set_bit_lock, it need a loongson_llsc_mb.

Huacai

  reply index

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-31  5:58 [PATCH v2 0/9] check the node id consistently across different arches Yunsheng Lin
2019-08-31  5:58 ` [PATCH v2 1/9] arm64: numa: check the node id consistently for arm64 Yunsheng Lin
2019-08-31  5:58 ` [PATCH v2 2/9] x86: numa: check the node id consistently for x86 Yunsheng Lin
2019-08-31  8:55   ` Peter Zijlstra
2019-08-31 10:09     ` Yunsheng Lin
2019-08-31 16:12       ` Peter Zijlstra
2019-09-01  4:45         ` 陈华才 [this message]
     [not found]           ` <2019090410032559707512@loongson.cn>
2019-09-04  9:21             ` Something about loongson_llsc_mb Peter Zijlstra
2019-09-04 10:04               ` Peter Zijlstra
2019-09-04 12:57               ` Huang Pei
2019-09-02  5:46         ` [PATCH v2 2/9] x86: numa: check the node id consistently for x86 Yunsheng Lin
2019-09-02  7:25           ` Peter Zijlstra
2019-09-02 12:25             ` Yunsheng Lin
2019-09-02 12:56               ` Peter Zijlstra
2019-09-02 18:22                 ` Ingo Molnar
2019-09-02 19:14                   ` Peter Zijlstra
2019-09-03  6:19                 ` Yunsheng Lin
2019-09-03  7:11                   ` Peter Zijlstra
2019-09-03  8:31                     ` Yunsheng Lin
2019-09-02 18:17             ` Ingo Molnar
2019-09-03  7:53               ` [PATCH] x86/mm: Fix cpumask_of_node() error condition Peter Zijlstra
2019-08-31  5:58 ` [PATCH v2 3/9] alpha: numa: check the node id consistently for alpha Yunsheng Lin
2019-08-31  5:58 ` [PATCH v2 4/9] powerpc: numa: check the node id consistently for powerpc Yunsheng Lin
2019-08-31  5:58 ` [PATCH v2 5/9] s390: numa: check the node id consistently for s390 Yunsheng Lin
2019-09-02  4:05   ` kbuild test robot
2019-08-31  5:58 ` [PATCH v2 6/9] sh: numa: check the node id consistently for sh Yunsheng Lin
2019-08-31  5:58 ` [PATCH v2 7/9] sparc64: numa: check the node id consistently for sparc64 Yunsheng Lin
2019-08-31  6:53   ` David Miller
2019-08-31  8:57     ` Yunsheng Lin
2019-08-31 20:02       ` David Miller
2019-09-02  6:08         ` Yunsheng Lin
2019-09-02 15:17           ` David Miller
2019-08-31  5:58 ` [PATCH v2 8/9] mips: numa: check the node id consistently for mips ip27 Yunsheng Lin
2019-08-31  5:58 ` [PATCH v2 9/9] mips: numa: check the node id consistently for mips loongson64 Yunsheng Lin

Reply instructions:

You may reply publically 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=tencent_34DDA31F622119EE5003B7F4@qq.com \
    --to=chenhc@lemote.com \
    --cc=huangpei@loongson.cn \
    --cc=jhogan@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=paul.burton@mips.com \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.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

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git