* /proc/meminfo swap counter wraparound in 2.2
@ 2001-09-12 9:51 Sean Hunter
2001-09-12 10:07 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Sean Hunter @ 2001-09-12 9:51 UTC (permalink / raw)
To: linux-kernel
Hi there
Having put 8Gb of swap on one of our production database servers[1], I found
that "top", "free" et al report the amount of available swap space incorrectly.
This is because they all parse /proc/meminfo, and its counters seem to wrap
when they encounter very high numbers. The relevant bit is the totalswap
member of "struct sysinfo"
sean@lisa:~$ cat /proc/swaps
Filename Type Size Used Priority
/dev/rd/c0d2p1 partition 530104 41436 10
/usr/SWAPFILE1 file 1048568 56 2
/usr/local/SWAPFILE1 file 1048568 52 2
/usr/SWAPFILE2 file 1572856 0 3
/usr/local/SWAPFILE2 file 1572856 0 3
/var/SWAPFILE2 file 1572856 0 3
/home/SWAPFILE2 file 1572856 0 -6
sean@lisa:~$ cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 4125683712 2820616192 1305067520 0 82919424 232722432
Swap: 542777344 42541056 500236288
MemTotal: 4028988 kB
MemFree: 1274480 kB
MemShared: 0 kB
Buffers: 80976 kB
Cached: 227268 kB
BigTotal: 3111908 kB
BigFree: 1266988 kB
SwapTotal: 530056 kB
SwapFree: 488512 kB
sean@lisa:~$ uname -a
Linux lisa.sportingbet.com 2.2.19-6.2.7enterprise #1 SMP Thu Jun 14 07:34:12 EDT 2001 i686 unknown
As you can see, we are running redhat's "enterprise" 2.2.19 kernel.
I would be amazed if this bug were not also in the main 2.2.x tree. Is a fix
likely or even possible in 2.2 ?
Sean
[1]One of several changes to avoid random oracle 600 errors under heavy load.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: /proc/meminfo swap counter wraparound in 2.2
2001-09-12 9:51 /proc/meminfo swap counter wraparound in 2.2 Sean Hunter
@ 2001-09-12 10:07 ` Alan Cox
2001-09-12 10:12 ` Sean Hunter
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2001-09-12 10:07 UTC (permalink / raw)
To: Sean Hunter; +Cc: linux-kernel
> I would be amazed if this bug were not also in the main 2.2.x tree. Is a fix
> likely or even possible in 2.2 ?
No fix is planned for 2.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: /proc/meminfo swap counter wraparound in 2.2
2001-09-12 10:07 ` Alan Cox
@ 2001-09-12 10:12 ` Sean Hunter
2001-09-12 10:31 ` Sean Hunter
0 siblings, 1 reply; 4+ messages in thread
From: Sean Hunter @ 2001-09-12 10:12 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
On Wed, Sep 12, 2001 at 11:07:55AM +0100, Alan Cox wrote:
> > I would be amazed if this bug were not also in the main 2.2.x tree. Is a fix
> > likely or even possible in 2.2 ?
>
> No fix is planned for 2.2
>
OK, thanks. I'm a little reluctant to move this box to 2.4 yet (before Monday
we had almost a year's uptime out of it- frequent reboots are frowned upon),
but looking at the 2.4 source, the relevant bits of fs/proc/array.c and
include/linux/kernel.h look exactly the same, so the problem could be there as
well.
Am I being dumb?
Sean
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: /proc/meminfo swap counter wraparound in 2.2
2001-09-12 10:12 ` Sean Hunter
@ 2001-09-12 10:31 ` Sean Hunter
0 siblings, 0 replies; 4+ messages in thread
From: Sean Hunter @ 2001-09-12 10:31 UTC (permalink / raw)
To: Alan Cox, linux-kernel
On Wed, Sep 12, 2001 at 11:12:29AM +0100, Sean Hunter wrote:
> On Wed, Sep 12, 2001 at 11:07:55AM +0100, Alan Cox wrote:
> > > I would be amazed if this bug were not also in the main 2.2.x tree. Is a fix
> > > likely or even possible in 2.2 ?
> >
> > No fix is planned for 2.2
> >
>
> OK, thanks. I'm a little reluctant to move this box to 2.4 yet (before Monday
> we had almost a year's uptime out of it- frequent reboots are frowned upon),
> but looking at the 2.4 source, the relevant bits of fs/proc/array.c and
> include/linux/kernel.h look exactly the same, so the problem could be there as
> well.
>
> Am I being dumb?
Yes, of course I am. Having now Actually Tried It Instead Of Just Talking
Bollocks[tm], I can confirm that large amounts of swap space seem to work just
fine in 2.4.
Sorry for wasting people's time.
Sean
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-09-12 10:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-12 9:51 /proc/meminfo swap counter wraparound in 2.2 Sean Hunter
2001-09-12 10:07 ` Alan Cox
2001-09-12 10:12 ` Sean Hunter
2001-09-12 10:31 ` Sean Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox