eliminate nswap and cnswap
Quoted 2 lines
The nswap and cnswap variables counters have never been incremented as Linux doesn't do task swapping.
I'm pretty sure they were used for paging activity. We don't eliminate support for "swap space", do we?
Somebody must have broken nswap and cnswap while hacking on some vm code. I hate to see the variables get completely ripped out of the kernel instead of getting fixed.
Quoted 11 lines · Albert Cahalan
Quoted 3 lines
The nswap and cnswap variables counters have never been incremented as Linux doesn't do task swapping.
I'm pretty sure they were used for paging activity. We don't eliminate support for "swap space", do we?
Somebody must have broken nswap and cnswap while hacking on some vm code. I hate to see the variables get completely ripped out of the kernel instead of getting fixed.
There's nothing in 2.4 which increments these, nor was there in 2.6. Which tends to imply that they weren't very important.
We could sort-of do this - move them into mm_struct (doing it in task_struct was always wrong) and increment them in the VM. But we'd need some reason why these statistics are interesting, and we'd need an explanation of what nswap and cnswap are actually supposed to represent.
Quoted 13 lines · Andrew Morton
Quoted 11 lines · Albert Cahalan
Quoted 3 lines
The nswap and cnswap variables counters have never been incremented as Linux doesn't do task swapping.
I'm pretty sure they were used for paging activity. We don't eliminate support for "swap space", do we?
Somebody must have broken nswap and cnswap while hacking on some vm code. I hate to see the variables get completely ripped out of the kernel instead of getting fixed.
Quoted 7 lines
There's nothing in 2.4 which increments these, nor was there in 2.6. Which tends to imply that they weren't very important.
We could sort-of do this - move them into
mm_struct(doing it intask_structwas always wrong) and increment them in the VM. But we'd need some reason why these statistics are interesting, and we'd need an explanation of what nswap and cnswap are actually supposed to represent.
It's used in 2.0 and 2.2 to satisfy the getrusage(2) syscall. The getrusage page only documents it as 'swaps', but says:
The above struct was taken from BSD 4.3 Reno. Not all fields are meaningful under Linux. Right now (Linux 2.4) only the fields ru_utime, ru_stime, ru_minflt, ru_majflt, and ru_nswap are maintained.
the BSD manpage says:
ru_nswap
the number of times a process was swapped out of main memory.
Which means it's a count of full process swaps like ancestral UNIX, which Linux has never had.
So the 2.0/2.2 attempt to increment said variables was actually bogus.
Signature · 1 line
Matt Mackall : http://www.selenic.com : Linux development and consulting
Quoted 30 lines · Matt Mackall
Quoted 13 lines · Andrew Morton
Quoted 11 lines · Albert Cahalan
Quoted 3 lines
The nswap and cnswap variables counters have never been incremented as Linux doesn't do task swapping.
I'm pretty sure they were used for paging activity. We don't eliminate support for "swap space", do we?
Somebody must have broken nswap and cnswap while hacking on some vm code. I hate to see the variables get completely ripped out of the kernel instead of getting fixed.
Quoted 7 lines
There's nothing in 2.4 which increments these, nor was there in 2.6. Which tends to imply that they weren't very important.
We could sort-of do this - move them into
mm_struct(doing it intask_structwas always wrong) and increment them in the VM. But we'd need some reason why these statistics are interesting, and we'd need an explanation of what nswap and cnswap are actually supposed to represent.It's used in 2.0 and 2.2 to satisfy the getrusage(2) syscall. The getrusage page only documents it as 'swaps', but says:
The above struct was taken from BSD 4.3 Reno. Not all fields are meaningful under Linux. Right now (Linux 2.4) only the fields
ru_utime,ru_stime,ru_minflt,ru_majflt, andru_nswapare maintained.
Quoted 7 lines
the BSD manpage says:
ru_nswap
the number of times a process was swapped out of main memory.Which means it's a count of full process swaps like ancestral UNIX, which Linux has never had.
Well, that's the BSD man page.
I've always considered "swapped" to mean "paged" when dealing with Linux. We still have our swap partitions and swapon command, not paging partitions and pageon command.
I suppose "paged out the area with the stack pointer" would be a good approximation to the BSD behavior.
Quoted 1 line
So the 2.0/2.2 attempt to increment said variables was actually bogus.
If the variables counted paging, I consider them correct for Linux.
Quoted 11 lines · Albert Cahalan
Quoted 2 lines
The nswap and cnswap variables counters have never been incremented as Linux doesn't do task swapping.
I'm pretty sure they were used for paging activity. We don't eliminate support for "swap space", do we?
Somebody must have broken nswap and cnswap while hacking on some vm code. I hate to see the variables get completely ripped out of the kernel instead of getting fixed.
Since Linux doesn't swap, "fixed" would mean returning zero for these values. I don't thing even BSD swaps anymore, does it? In any case, Linux never did.
Signature · 3 lines
-bill davidsen ([email protected]) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me