mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Permit inode & dentry hash tables to be allocated > MAX_ORDER size [try #3]
Date: Mon, 14 Jun 2004 04:04:17 -0700	[thread overview]
Message-ID: <20040614040417.29e7497b.akpm@osdl.org> (raw)
In-Reply-To: <18241.1087210067@redhat.com>

David Howells <dhowells@redhat.com> wrote:
>
> 
> > What's the attribute((pure)) for?
> 
> It tells gcc that the function's result only depends on its arguments... it
> makes no references at all to external data. It's like __attribute__((const))
> but stronger. This means that gcc can generate code that caches the result.

Of course, but we could use it in zillions of places and we don't.  Does it
actually help?

> > It generates a warning on older gcc - please use __attribute_pure__.
> 
> We still support gcc's that old?

yup.  And gcc-3.4 complains that log2() conflicts with an inbuilt function,
but you renamed it.

> > The other four or five implementations of log2() use ffx(~n).
> 
> Yes... but ffs() and ffz() take int args, not long args. I suspect that
> shouldn't matter (that would require the hash table to be calculated at 4Gig
> buckets in size or greater to be a problem), but why take the chance when we
> can avoid it easily?

No, ffz() takes an unsigned long argument.


It's still not clear to me why we cannot simply increase MAX_ORDER.  If
that exposes shortcomings in the buddy allocator, that should be where we
expend effort?

  reply	other threads:[~2004-06-14 11:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-11 10:44 [PATCH] Permit inode & dentry hash tables to be allocated > MAX_ORDER size David Howells
2004-06-11 10:48 ` Andrew Morton
2004-06-11 11:12 ` David Howells
2004-06-11 22:04   ` Andrew Morton
2004-06-11 23:03     ` Martin J. Bligh
2004-06-11 23:19       ` Andrew Morton
2004-06-11 23:18         ` Martin J. Bligh
2004-06-11 23:30           ` Andrew Morton
2004-06-12 12:45             ` Andy Whitcroft
2004-06-13 16:09         ` Linus Torvalds
2004-06-11 14:21 ` [PATCH] Permit inode & dentry hash tables to be allocated > MAX_ORDER size [#2] David Howells
2004-06-11 22:01   ` Andrew Morton
2004-06-14 10:47   ` [PATCH] Permit inode & dentry hash tables to be allocated > MAX_ORDER size [try #3] David Howells
2004-06-14 11:04     ` Andrew Morton [this message]
2004-06-14 11:41     ` 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=20040614040417.29e7497b.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®