public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Gregory Giguashvili <Gregoryg@ParadigmGeo.com>
Cc: "'Andi Kleen'" <ak@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: Problem with msync system call
Date: Tue, 23 Jul 2002 20:06:04 +0200	[thread overview]
Message-ID: <20020723200604.A10501@wotan.suse.de> (raw)
In-Reply-To: <EE83E551E08D1D43AD52D50B9F511092E114A4@ntserver2>

On Tue, Jul 23, 2002 at 08:45:07PM +0200, Gregory Giguashvili wrote:
> >Do a F_SETFL lock/unlock on the file  That should act as a 
> >full NFS write barrier and flush all buffers. Best is if you synchronize 
> >between the various writers with the full lock.
> 
> Do you mean F_SETLK? If so, this didn't help (the source is attached).

F_SETLK sorry.

You need to do it on both reader and writer. On the writer it acts
like a fsync(), on the reader it should clear the cache.

I think the problem in your case is that you have the pages mmaped.
NFS uses invalidate_inode_pages() to throw away the cache, but that
doesn't work when the pages are mapped. It may work to munmap/mmap
around the locking.

In theory with rmap (=2.5) the kernel could do that unmap/remap for you,
but it will be probably non trivial to implement.

-Andi

  reply	other threads:[~2002-07-23 18:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 18:45 Problem with msync system call Gregory Giguashvili
2002-07-23 18:06 ` Andi Kleen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-23 19:36 Gregory Giguashvili
2002-07-23 19:04 Gregory Giguashvili
2002-07-23 18:00 Gregory Giguashvili
     [not found] <EE83E551E08D1D43AD52D50B9F511092E1149F@ntserver2.suse.lists.linux.kernel>
2002-07-23 17:07 ` Andi Kleen
2002-07-23 18:01   ` Trond Myklebust
2002-07-23 16:58 Gregory Giguashvili
2002-07-23 16:31 ` Dr. Michael Weller

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=20020723200604.A10501@wotan.suse.de \
    --to=ak@suse.de \
    --cc=Gregoryg@ParadigmGeo.com \
    --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