From: Christoph Hellwig <hch@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [RESEND][PATCH 4/6] Add page becoming writable notification
Date: Thu, 14 Oct 2004 21:35:45 +0100 [thread overview]
Message-ID: <20041014203545.GA13639@infradead.org> (raw)
In-Reply-To: <24449.1097780701@redhat.com>
> +
> + /* notification that a page is about to become writable */
> + int (*page_mkwrite)(struct page *page);
This doesn't fit into address_space operations at all. The vm_operation
below is enough.
> --- linux-2.6.9-rc1-mm2/mm/memory.c 2004-08-31 16:52:40.000000000 +0100
> +++ linux-2.6.9-rc1-mm2-cachefs/mm/memory.c 2004-09-02 15:40:26.000000000 +0100
> @@ -1030,6 +1030,54 @@ static inline void break_cow(struct vm_a
> }
>
> /*
> + * Make a PTE writeable for do_wp_page() on a shared-writable page
> + */
> +static inline int do_wp_page_mk_pte_writable(struct mm_struct *mm,
> + struct vm_area_struct *vma,
> + unsigned long address,
> + pte_t *page_table,
> + struct page *old_page,
> + pte_t pte)
This prototype shows pretty much that splitting it out doesn't make much sense.
Why not add a goto reuse_page; where you call it currently and append it
at the end of do_wp_page?
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [RESEND][PATCH 4/6] Add page becoming writable notification
Date: Thu, 14 Oct 2004 21:35:45 +0100 [thread overview]
Message-ID: <20041014203545.GA13639@infradead.org> (raw)
In-Reply-To: <24449.1097780701@redhat.com>
> +
> + /* notification that a page is about to become writable */
> + int (*page_mkwrite)(struct page *page);
This doesn't fit into address_space operations at all. The vm_operation
below is enough.
> --- linux-2.6.9-rc1-mm2/mm/memory.c 2004-08-31 16:52:40.000000000 +0100
> +++ linux-2.6.9-rc1-mm2-cachefs/mm/memory.c 2004-09-02 15:40:26.000000000 +0100
> @@ -1030,6 +1030,54 @@ static inline void break_cow(struct vm_a
> }
>
> /*
> + * Make a PTE writeable for do_wp_page() on a shared-writable page
> + */
> +static inline int do_wp_page_mk_pte_writable(struct mm_struct *mm,
> + struct vm_area_struct *vma,
> + unsigned long address,
> + pte_t *page_table,
> + struct page *old_page,
> + pte_t pte)
This prototype shows pretty much that splitting it out doesn't make much sense.
Why not add a goto reuse_page; where you call it currently and append it
at the end of do_wp_page?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-10-14 20:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 19:05 [RESEND][PATCH 4/6] Add page becoming writable notification David Howells
2004-10-14 19:05 ` David Howells
2004-10-14 19:29 ` Matthew Wilcox
2004-10-14 19:29 ` Matthew Wilcox
2004-10-14 20:35 ` Christoph Hellwig [this message]
2004-10-14 20:35 ` Christoph Hellwig
2004-10-15 15:05 ` David Howells
2004-10-15 15:05 ` David Howells
2004-10-15 15:34 ` Christoph Hellwig
2004-10-15 15:34 ` Christoph Hellwig
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=20041014203545.GA13639@infradead.org \
--to=hch@infradead.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.