public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Baokun Li <libaokun1@huawei.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	kernel test robot <lkp@intel.com>, <sfr@canb.auug.org.au>,
	<llvm@lists.linux.dev>, <oe-kbuild-all@lists.linux.dev>,
	Christian Brauner <christianvanbrauner@gmail.com>,
	yangerkun <yangerkun@huawei.com>,
	"zhangyi (F)" <yi.zhang@huawei.com>, <linux-next@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>, Baokun Li <libaokun1@huawei.com>
Subject: Re: [brauner-vfs:vfs.misc 12/13] include/linux/fs.h:911:9: error: call to '__compiletime_assert_207' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
Date: Wed, 24 Jan 2024 21:38:49 +0800	[thread overview]
Message-ID: <098f69f5-524b-9ddd-3d07-5e5c04135fcb@huawei.com> (raw)
In-Reply-To: <20240124-warnhinweis-servolenkung-e482feb8fc43@brauner>

On 2024/1/24 21:27, Christian Brauner wrote:
>> If CONFIG_SMP is not enabled in include/asm-generic/barrier.h,
>> then smp_load_acquire/smp_store_release is implemented as
>> READ_ONCE/READ_ONCE and barrier() and type checking.
>> READ_ONCE/READ_ONCE already checks the pointer type,
>> but then checks it more stringently outside, but here the
>> more stringent checking seems unnecessary, so it is removed
>> and only the type checking in READ_ONCE/READ_ONCE is kept
>> to avoid compilation errors.
> Maha, brainfart on my end, I missed the !CONFIG_SMP case.
> Sorry about that.
Never mind. 😊
>> When CONFIG_SMP is enabled on 32-bit architectures,
>> smp_load_acquire/smp_store_release is not called in i_size_read/write,
>> so there is no compilation problem. On 64-bit architectures, there
>> is no compilation problem because sizeof(long long) == sizeof(long),
>> regardless of whether CONFIG_SMP is enabled or not.
> Yes, of course.
>
>> Yes, using smp_rmb()/smp_wmb() would also solve the problem, but
>> the initial purpose of this patch was to replace smp_rmb() in filemap_read()
>> with the clearer smp_load_acquire/smp_store_release, and that's where
>> the community is going with this evolution. Later on, buffer and page/folio
>> will also switch to acquire/release, which is why I think Linus' suggestion
>> is better.
> Ah ok, thanks for the context. Can you send an updated series then, please?
>
No problem, I'll send a new version soon!

Cheers!
-- 
With Best Regards,
Baokun Li
.

  reply	other threads:[~2024-01-24 13:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202401230837.TXro0PHi-lkp@intel.com>
2024-01-23  7:07 ` [brauner-vfs:vfs.misc 12/13] include/linux/fs.h:911:9: error: call to '__compiletime_assert_207' declared with 'error' attribute: Need native word sized stores/loads for atomicity Baokun Li
2024-01-23 16:24   ` Christian Brauner
2024-01-24  7:52     ` Baokun Li
2024-01-24 10:30       ` Christian Brauner
2024-01-24 11:53         ` Baokun Li
2024-01-24 13:27           ` Christian Brauner
2024-01-24 13:38             ` Baokun Li [this message]
2024-01-23 17:46   ` Linus Torvalds
2024-01-24  7:31     ` Baokun Li

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=098f69f5-524b-9ddd-3d07-5e5c04135fcb@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=brauner@kernel.org \
    --cc=christianvanbrauner@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.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