From: David Howells <dhowells@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: fork pagesize patch
Date: Tue, 16 Nov 2004 16:58:50 +0000 [thread overview]
Message-ID: <26707.1100624330@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0411160834220.2222@ppc970.osdl.org>
> > Sorry... I meant warning not error. It doesn't actually stop it building a
> > working kernel, but gcc _does_ complain, and not unreasonably, I think.
>
> I think it _is_ unreasonable. It's like doing
>
> if (a)
> x /= a;
Doing it with variables is not exactly the same. The compiler has been told to
optimise arithmetic on constants, and as such it has to represent a div-by-0
result, which obviously it can't.
Now, I agree that given the if-condition automatically precludes the div-by-0,
but maybe that's asking too much. Perhaps I should go and raise hell over it
with the gcc posse.
> Anyway, to make it not warn, why not change it to
>
> max_threads = mempages / (8*THREAD_SIZE/PAGE_SIZE);
>
> instead, and be done with it?
And drop the conditional entirely? I can go along with that.
> If the thread size is _that_ small that we still divide by zero, color me
> impressed.
Not unless you spell colour correctly:-)
David
next prev parent reply other threads:[~2004-11-16 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 15:38 fork pagesize patch David Howells
2004-11-16 16:02 ` Linus Torvalds
2004-11-16 16:11 ` David Howells
2004-11-16 16:40 ` Linus Torvalds
2004-11-16 16:58 ` David Howells [this message]
2004-11-16 17:11 ` Linus Torvalds
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=26707.1100624330@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.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.