LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	William Lee Irwin III <wli@holomorphy.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Matt Helsley <matthltc@us.ibm.com>
Subject: Re: [PATCH] sys_remap_file_pages: fix ->vm_file accounting
Date: Mon, 11 Feb 2008 13:15:30 +0300	[thread overview]
Message-ID: <20080211101530.GA162@tv-sign.ru> (raw)
In-Reply-To: <Pine.LNX.4.64.0802061957110.32204@blonde.site>

Sorry for delay,

On 02/06, Hugh Dickins wrote:
> 
> On Sun, 3 Feb 2008, Oleg Nesterov wrote:
> > Off-topic question to all. sys_remap_file_pages() doesn't work with
> > shared readonly mappings, why?
> 
> Slight correction: it works with shared readonly mappings, doesn't
> it, so long as the mmap'ed file was opened for reading and writing?

Yes sure. I meant, if the file was opened without FMODE_WRITE, then
mmap(PROT_READ, MAP_SHARED) doesn't actually set VM_SHARED, it only
sets VM_MAYSHARE.

(this looks understandable, but means that !VM_SHARED doesn't necessary
 imply the possible cow).

> > IOW, why it checks VM_SHARED but not VM_MAYSHARE?
> 
> My guess has always been that it was just a misunderstanding of how
> those VM_ flags end up working: assume so unless Ingo corrects me.
> 
> By the time I realized that oddity, we'd been driven into several
> tiresome corners by the very existence of sys_remap_file_pages.
> So whereas my usual instinct would have been to relax the restriction
> and generalize, in its case I wanted to hold on to every restriction
> we had.

OK, thanks a lot. I was afraid I missed some "obvious" reason why we
can't do this.

Oleg.


      reply	other threads:[~2008-02-11 10:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30 14:20 Oleg Nesterov
2008-01-30 16:55 ` Miklos Szeredi
2008-01-30 17:26   ` Oleg Nesterov
2008-02-02 20:52     ` Matt Helsley
2008-02-02 21:17     ` Matt Helsley
2008-02-03 18:21       ` Oleg Nesterov
2008-02-06 20:33         ` Hugh Dickins
2008-02-07  0:16           ` Matt Helsley
2008-02-07 16:40             ` Hugh Dickins
2008-02-03 18:29     ` Oleg Nesterov
2008-02-06 20:13       ` Hugh Dickins
2008-02-11 10:15         ` Oleg Nesterov [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=20080211101530.GA162@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=mingo@elte.hu \
    --cc=mszeredi@suse.cz \
    --cc=nickpiggin@yahoo.com.au \
    --cc=wli@holomorphy.com \
    --subject='Re: [PATCH] sys_remap_file_pages: fix ->vm_file accounting' \
    /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

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).