linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RESEND] [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Date: Tue, 07 Oct 2008 08:43:39 +0200	[thread overview]
Message-ID: <87hc7onbvo.fsf@basil.nowhere.org> (raw)
In-Reply-To: <6.0.0.20.2.20081007140438.0580f110@172.19.0.2> (Hisashi Hifumi's message of "Tue, 07 Oct 2008 14:07:23 +0900")

Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp> writes:

> Hi Andrew.
>
> Currently reading or writing file->f_pos is not atomic on 32bit environment,
> so two or more simultaneous access can corrupt file->f_pos value.
> There are some past discussions about this issue, but this is not fixed yet.
> http://marc.info/?l=linux-kernel&m=120764199819899&w=2
> http://marc.info/?l=linux-kernel&m=114490379102476&w=2

Have you benchmarked if cmpxchg is cheaper than the seqlock?  It's not
clear to me a seqlock is really the right locking primitive for
this. Normally seqlocks should be used when reading is much more
frequent than writing, but it's doubtful that this is actually the
case for f_pos.

-Andi

-- 
ak@linux.intel.com

  reply	other threads:[~2008-10-07  6:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-07  5:07 [RESEND] [PATCH] VFS: make file->f_pos access atomic on 32bit arch Hisashi Hifumi
2008-10-07  6:43 ` Andi Kleen [this message]
2008-10-07 10:11   ` Hisashi Hifumi
2008-10-07 10:29     ` Andi Kleen
2008-10-07 16:27       ` Nick Piggin
2008-10-07 17:50         ` Andrew Morton
2008-10-07 18:59           ` Peter Zijlstra
2008-10-08  2:35             ` Nick Piggin
2008-10-08  2:52               ` Matthew Wilcox
2008-10-09 12:23                 ` Pavel Machek
2008-10-09 12:49                   ` Valdis.Kletnieks
2008-10-09 13:01                   ` Matthew Wilcox
2008-10-09 13:38                     ` Miklos Szeredi
2008-10-09 14:58                     ` Linus Torvalds
2008-10-09 17:29                   ` Jeremy Fitzhardinge
2008-10-08  4:48               ` Hisashi Hifumi
2008-10-08  5:10                 ` Nick Piggin
2008-10-08  5:16                 ` Matthew Wilcox
2008-10-08  6:28                 ` Andrew Morton
2008-10-08  6:51                 ` Peter Zijlstra
2008-10-08  8:32                   ` Eric Dumazet
2008-10-08  8:48                     ` Nick Piggin
2008-10-08  9:17                     ` Peter Zijlstra
2008-10-09 21:51                   ` dcg
2008-10-10  2:25                     ` Nick Piggin
2008-10-09 12:16             ` Pavel Machek
2008-10-08  0:40           ` Nick Piggin
2008-10-07 18:00         ` Matthew Wilcox

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=87hc7onbvo.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=hifumi.hisashi@oss.ntt.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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
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;
as well as URLs for NNTP newsgroup(s).