From: Christoph Hellwig <hch@lst.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org,
Arnd Bergmann <arnd.bergmann@de.ibm.com>
Subject: Re: [Cbe-oss-dev] [PATCH] spufs: Fix bitrot of the SPU mmap facility (#2)
Date: Fri, 9 Feb 2007 15:56:20 +0100 [thread overview]
Message-ID: <20070209145620.GA15548@lst.de> (raw)
In-Reply-To: <1171000330.2620.425.camel@localhost.localdomain>
On Fri, Feb 09, 2007 at 04:52:10PM +1100, Benjamin Herrenschmidt wrote:
> spufs: Fix bitrot of the SPU mmap facility
>
> It looks like we've had some serious bitrot there mostly due to tracking
> of address_space's of mmap'ed files getting out of sync with the actual
> mmap code. The mfc, mss and psmap were not tracked properly and thus
> not invalidated on context switches (oops !)
>
> I also removed the various file->f_mapping = inode->i_mapping;
> assignments that were done in the other open() routines since that
> is already done for us by __dentry_open.
>
> One improvement we might want to do later is to assign the various
> ctx-> fields at mmap time instead of file open/close time so that we
> don't call unmap_mapping_range() on thing that have not been mmap'ed
>
> Finally, I added some smp_wmb's after assigning the ctx-> fields to make
> sure they are visible to other CPUs. I don't think this is really
> necessary as I suspect locking in the fs layer will make that happen
> anyway but better safe than sorry.
Looks good to me.
prev parent reply other threads:[~2007-02-09 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 4:58 [PATCH 0/2] spufs: mmap fixes and updates Benjamin Herrenschmidt
2007-02-09 4:58 ` [PATCH 1/2] spufs: remove need for struct page for SPEs Benjamin Herrenschmidt
2007-02-09 4:58 ` [PATCH 2/2] spufs: Fix bitrot of the SPU mmap facility Benjamin Herrenschmidt
2007-02-09 5:52 ` [PATCH] spufs: Fix bitrot of the SPU mmap facility (#2) Benjamin Herrenschmidt
2007-02-09 14:56 ` Christoph Hellwig [this message]
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=20070209145620.GA15548@lst.de \
--to=hch@lst.de \
--cc=arnd.bergmann@de.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=cbe-oss-dev@ozlabs.org \
--cc=linuxppc-dev@ozlabs.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).