[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3815849.1674475246@warthog.procyon.org.uk>
Date: Mon, 23 Jan 2023 12:00:46 +0000
From: David Howells <dhowells@...hat.com>
To: unlisted-recipients:; (no To-header on input)
Cc: dhowells@...hat.com, David Hildenbrand <david@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...nel.org>,
Logan Gunthorpe <logang@...tatee.com>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>,
John Hubbard <jhubbard@...dia.com>, linux-mm@...ck.org
Subject: Re: [PATCH v7 2/8] iov_iter: Add a function to extract a page list from an iterator
David Howells <dhowells@...hat.com> wrote:
> > How does this work align with the goal of no longer using FOLL_GET for
> > O_DIRECT? We should get rid of any FOLL_GET usage for accessing page content.
>
> Would that run the risk of changes being made by the child being visible to
> the a DIO write if the parent changes the buffer first?
>
>
> PARENT CHILD
> ====== =====
> start-DIO-write
> fork() = pid fork() = 0
> alter-buffer
> CoW happens
> page copied original page retained
> alter-buffer
> <DMA-happens>
Ah, I think I might have got the wrong end of the stick. A pinned page is
*always* copied on fork() if I understand copy_present_pte() correctly.
David
Powered by blists - more mailing lists