From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Dave McCracken <dmccr@us.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
Diego Calleja <diegocg@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Hugh Dickins <hugh@veritas.com>
Subject: Re: [PATCH 2/2] Simple shared page tables
Date: Wed, 16 Aug 2006 13:55:07 +0300 [thread overview]
Message-ID: <20060816105507.GE3067@rhun.haifa.ibm.com> (raw)
In-Reply-To: <20060815225618.17433.84777.sendpatch@wildcat>
On Tue, Aug 15, 2006 at 05:56:18PM -0500, Dave McCracken wrote:
> The actual shared page table patches
Some stylistic nits I ran into while reading these:
> +#else /* CONFIG_PTSHARE */
> +#define pt_is_shared(page) (0)
> +#define pt_is_shared_pte(pmdval) (0)
> +#define pt_increment_share(page)
> +#define pt_decrement_share(page)
> +#define pt_share_pte(vma, pmd, address) pte_alloc_map(vma->vm_mm, pmd, address)
> +#define pt_unshare_range(mm, address, end)
> +#define pt_check_unshare_pte(mm, address, pmd) (0)
> +#endif /* CONFIG_PTSHARE */
ISTR empty statements gave warnings with some compilers, perhaps use
do {} while (0) here?
> @@ -144,8 +147,9 @@ mprotect_fixup(struct vm_area_struct *vm
> if (newflags & VM_WRITE) {
> if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED))) {
> charged = nrpages;
> - if (security_vm_enough_memory(charged))
> + if (security_vm_enough_memory(charged)) {
> return -ENOMEM;
> + }
Superflous {}
> newflags |= VM_ACCOUNT;
> }
> }
> @@ -182,7 +186,7 @@ success:
> if (vma->vm_ops && vma->vm_ops->page_mkwrite)
> mask &= ~VM_SHARED;
>
> - newprot = protection_map[newflags & mask];
> + newprot = protection_map[newflags & mask];
Whitespace damaged
Cheers,
Muli
--
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:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2006-08-16 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 22:56 [PATCH 0/2] Latest shared page table patches Dave McCracken
2006-08-15 22:56 ` [PATCH 1/2] pxx_page macro cleanup Dave McCracken
2006-08-15 22:56 ` [PATCH 2/2] Simple shared page tables Dave McCracken
2006-08-16 8:08 ` Andreas Mohr
2006-08-16 10:55 ` Muli Ben-Yehuda [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=20060816105507.GE3067@rhun.haifa.ibm.com \
--to=muli@il.ibm.com \
--cc=arjan@infradead.org \
--cc=diegocg@gmail.com \
--cc=dmccr@us.ibm.com \
--cc=hugh@veritas.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox