All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	dhowells@redhat.com, hch@infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] Making compound pages mandatory
Date: Wed, 17 Nov 2004 14:13:10 +1100	[thread overview]
Message-ID: <419AC1C6.4050403@yahoo.com.au> (raw)
In-Reply-To: <20041116182841.4ff7f2e5.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

Andrew Morton wrote:
> Linus Torvalds <torvalds@osdl.org> wrote:
> 
>>
>>
>>On Tue, 16 Nov 2004, David Howells wrote:
>>
>>>Do you have any objection to compound pages being made mandatory, even without
>>>HUGETLB support?
>>
>>I haven't really looked into it, so I cannot make an informed decision.  
>>How big is the overhead? And what's the _point_, since we don't seem to 
>>need them normally, but the code is there for people who _do_ need them? 
> 
> 
> Yes, it's just the single pointer chase.  Probably that's the common case
> now, because everyone will be enabling hugepages on lots of architectures.
> 
> But still, the non-compound code is well tested too, and leaving it in
> place does make a little microoptimisation available to those who want it,
> so I don't see a reason yet to make compound pages compulsory.
> 
> So I'd suggest that we make compound pages conditional on a new
> CONFIG_COMPOUND_PAGE and make that equal to HUGETLB_PAGE || !MMU.

Good idea. BTW, any reason why the following (very)micro optimisation
shouldn't go in?

It currently only picks up a couple of things under fs/, but might help
reduce other ifdefery around the place. For example mm.h: page_count and
get_page.

[-- Attachment #2: mm-page_compound-microopt.patch --]
[-- Type: text/x-patch, Size: 880 bytes --]




---

 linux-2.6-npiggin/include/linux/page-flags.h |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN include/linux/page-flags.h~mm-page_compound-microopt include/linux/page-flags.h
--- linux-2.6/include/linux/page-flags.h~mm-page_compound-microopt	2004-11-17 14:02:44.000000000 +1100
+++ linux-2.6-npiggin/include/linux/page-flags.h	2004-11-17 14:09:07.000000000 +1100
@@ -286,7 +286,11 @@ extern unsigned long __read_page_state(u
 #define ClearPageReclaim(page)	clear_bit(PG_reclaim, &(page)->flags)
 #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags)
 
+#ifdef CONFIG_HUGETLB_PAGE
 #define PageCompound(page)	test_bit(PG_compound, &(page)->flags)
+#else
+#define PageCompound(page)	0
+#endif
 #define SetPageCompound(page)	set_bit(PG_compound, &(page)->flags)
 #define ClearPageCompound(page)	clear_bit(PG_compound, &(page)->flags)
 

_

  reply	other threads:[~2004-11-17  3:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 18:48 [RFC] Making compound pages mandatory David Howells
2004-11-16 19:20 ` Andrew Morton
2004-11-16 19:41   ` David Howells
2004-11-17  1:50 ` Linus Torvalds
2004-11-17  2:28   ` Andrew Morton
2004-11-17  3:13     ` Nick Piggin [this message]
2004-11-17  3:22       ` Nick Piggin
2004-11-17  3:37         ` Nick Piggin
2004-11-17  3:42           ` Nick Piggin
2004-11-17  3:14     ` Linus Torvalds
2004-11-17 12:03       ` David Howells
2004-11-17 11:47     ` David Howells
2004-11-17 11:43   ` David Howells

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=419AC1C6.4050403@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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.