All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan von Krawczynski <skraw@ithnet.com>
To: Ville Herva <vherva@mail.niksula.cs.hut.fi>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fw: Re: [PATCH] fix page aging (2.4.9-ac12)
Date: Thu, 20 Sep 2001 16:20:54 +0200	[thread overview]
Message-ID: <20010920162054.5f430fd4.skraw@ithnet.com> (raw)
In-Reply-To: <20010920170349.E22640@niksula.cs.hut.fi>
In-Reply-To: <20010920154806.75d7da23.skraw@ithnet.com> <20010920170349.E22640@niksula.cs.hut.fi>

On Thu, 20 Sep 2001 17:03:49 +0300 Ville Herva <vherva@niksula.hut.fi> wrote:

> age - PAGE_AGE_DECL may be a 2^32-1 or so, but when you cast it back to int,
> it is at most 2^31 again. It rolls over, so you get the sign bit back.
> Witness:
> 
> vherva@linux:/home/vherva>cat n.c
> #define FOUR 4
> void main()
> {
>    unsigned three = 3;
>    printf("%u\n", three - FOUR);
>    printf("%i\n", (int)(three - FOUR));
>    printf("%i\n", (int)three - (int)FOUR);
> }
> 
> vherva@linux:/home/vherva>./a.out
> 4294967295
> -1
> -1
> 
> Perhaps a lucky incidence, but it works as Daniel wrote it. (At least on
> 32-bit architecture.)

Aha, you name it, and how do you find these goodies when moving the kernel over
to some new hardware platform? Even wrong things have long lives (see communist
block), nevertheless fate sometimes strikes back...

Regards,
Stephan



  reply	other threads:[~2001-09-20 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-20 13:48 Fw: Re: [PATCH] fix page aging (2.4.9-ac12) Stephan von Krawczynski
2001-09-20 14:03 ` Ville Herva
2001-09-20 14:20   ` Stephan von Krawczynski [this message]
2001-09-20 14:57     ` Ville Herva
2001-09-20 19:29 ` Oliver Xymoron

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=20010920162054.5f430fd4.skraw@ithnet.com \
    --to=skraw@ithnet.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vherva@mail.niksula.cs.hut.fi \
    /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.