Date: Thu, 29 Aug 2002 17:45:39 -0700 From: Peter Wemm <peter@wemm.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys param.h Message-ID: <20020830004539.C123C2A7D6@canning.wemm.org> In-Reply-To: <200208300029.g7U0TrrW006459@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote: > Modified files: > sys/sys param.h > Log: > AARGH! btoc() is used in the MI buffer sizing routines to calculate > the minimum of either physmem or KVA. But.. btoc() casts the address > to (unsigned int). This is NOT GOOD on 64 bit machines and on alpha and > ia64, this results in a buffer limit of around 500K (not megs). This > causes extreme disk access problems on alpha and ia64. Since this cast > is simply to ensure that it is unsigned, use 'vm_offset_t' instead. This > is available because it is already defined in types.h. > > Alpha has been suffering from this for ages. It always felt like the > caching wasn't working, and unfortunately it turned out that way. :-( Pointy hat to: phk sys/param.h revision 1.127 date: 2002/05/14 20:35:29; author: phk; state: Exp; lines: +68 -0 Move MI stuff out of MD param.h files. +#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT) alpha/include/param.h: revision 1.28 date: 2002/05/14 20:35:25; author: phk; state: Exp; lines: +0 -38 Move MI stuff out of MD param.h files. -#define btoc(x) (((x) + PAGE_MASK) >> PAGE_SHIFT) ie: he used the x86 version on all platforms without accounting for the differences. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020830004539.C123C2A7D6>