|Daniel Lang||Jul 5, 2002 4:35 am|
|David Schultz||Jul 5, 2002 6:34 am|
|David Schultz||Jul 5, 2002 6:38 am|
|Terry Lambert||Jul 5, 2002 7:33 am|
|Daniel Lang||Jul 5, 2002 4:41 pm|
|Darren Pilgrim||Jul 5, 2002 5:57 pm|
|Bernd Walter||Jul 5, 2002 7:06 pm|
|Terry Lambert||Jul 5, 2002 11:12 pm|
|Matthew Dillon||Jul 6, 2002 1:10 am|
|Darren Pilgrim||Jul 6, 2002 2:36 pm|
|Matthew D. Fuller||Jul 6, 2002 2:51 pm|
|Bernd Walter||Jul 6, 2002 3:06 pm|
|Darren Pilgrim||Jul 6, 2002 3:42 pm|
|Terry Lambert||Jul 6, 2002 4:00 pm|
|Bernd Walter||Jul 6, 2002 4:04 pm|
|Bernd Walter||Jul 6, 2002 4:13 pm|
|Matthew Dillon||Jul 6, 2002 4:33 pm|
|Matthew Dillon||Jul 6, 2002 4:42 pm|
|Bernd Walter||Jul 6, 2002 5:09 pm|
|Matthew Dillon||Jul 6, 2002 5:33 pm|
|Bernd Walter||Jul 6, 2002 5:42 pm|
|Matthew Dillon||Jul 6, 2002 5:46 pm|
|Ian Dowse||Jul 6, 2002 5:49 pm|
|Bernd Walter||Jul 6, 2002 6:21 pm|
|Darren Pilgrim||Jul 6, 2002 10:01 pm|
|Matthew Dillon||Jul 6, 2002 10:09 pm|
|Darren Pilgrim||Jul 6, 2002 10:43 pm|
|Subject:||Re: How does swap work address spacewise?|
|From:||Bernd Walter (tic...@cicely5.cicely.de)|
|Date:||Jul 6, 2002 4:04:18 pm|
On Sat, Jul 06, 2002 at 03:43:00PM -0700, Darren Pilgrim wrote:
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,
Because negative numbers are used internaly to handle errors. It's already 64 bit in -current so no need to worry about the future.
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).
SCSI1+2 has 24 and 32 bit unsigned. SCSI3 has defined wider commands - IIRC it was 48bit.
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?
options NSWAPDEV=5 in kernelconfig.
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.
The swappager balances itself, which is different to RAID. E.g. it can avoid spreading an object over disks. IIRC the needed kernel space is even less if your swap is on more disks.
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message