Date: Sat, 06 Jul 2002 15:43:00 -0700 From: Darren Pilgrim <dmp@pantherdragon.org> To: ticso@cicely.de Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How does swap work address spacewise? Message-ID: <3D277274.B5F3CE58@pantherdragon.org> References: <20020705113532.GA11273@atrbg11.informatik.tu-muenchen.de> <20020705133515.GA295@HAL9000.wox.org> <20020705133837.GA513@HAL9000.wox.org> <20020705234126.GA12183@atrbg11.informatik.tu-muenchen.de> <3D2640A7.3EA2236B@pantherdragon.org> <20020706020656.GL48977@cicely5.cicely.de> <3D2762FE.9D9E0378@pantherdragon.org> <20020706220720.GG23704@cicely5.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Bernd Walter wrote: > On Sat, Jul 06, 2002 at 02:37:02PM -0700, Darren Pilgrim wrote: > > Bernd Walter wrote: > > > On Fri, Jul 05, 2002 at 05:58:15PM -0700, Darren Pilgrim wrote: > > > > If RAM + swap can be more than 4GB, how does FreeBSD address swap on a > > > > 32-bit machine? Does the kernel internally use a wider address space > > > > > > The same way it does on every partitition: using block numbers. > > > That way you can address 1TByte. > > > > I thought the limit for filesystems was 2TB? > > The Blocknumber is signed that gives: > 2^31 * 512Bytes Why sign the blocknumber? LBA uses an unsigned 32-bit integer, allowing 2TB, and IIRC SCSI uses an unsigned integer as well (though I can't remember if that one is 32 or 48 bits, or if they've gotten to 64 bits by now). > > > And you can have more than a single swap partition. > > > > Up to four, so then the theoretical limit for swap is 8TB? > > 4 is just a default. > The limit here is the maximum number of harddisks, which is IIRC 512 > per driver. > This cames from the available minor bits in the device node. That makes sense, how do you get past the default of four? Is there a tweak to be made, or do you just swapon as usual? > > > In reality managementstructures which have to be in kernel addressspace > > > is limiting swap before. > > > > Do these management structures grow as swap grows, or do they only > > change as the utilization increases? > > AFAIK there is a static part. > Possible not memory but only KVM addressspace. > Also AFAIK it makes a difference if you allocate the same space > using a single partition or in more than one. Understandable, with more than one, the kernel then has to do what amounts to software RAID on the swap partitions. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D277274.B5F3CE58>