Date: Tue, 8 Feb 2005 17:56:04 +0900 (JST) From: Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp> To: FreeBSD-gnats-submit@FreeBSD.org Cc: turutani@polymer3.scphys.kyoto-u.ac.jp Subject: kern/77253: meminfo in linprocfs returns bad value about swap. Message-ID: <200502080856.j188u4sh000755@polymer3.scphys.kyoto-u.ac.jp> Resent-Message-ID: <200502080900.j1890TkZ047421@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 77253 >Category: kern >Synopsis: meminfo in linprocfs returns bad value about swap. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 08 09:00:28 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Tsurutani Naoki >Release: FreeBSD 4.10-STABLE i386 >Organization: >Environment: System: FreeBSD polymer3.scphys.kyoto-u.ac.jp 4.10-STABLE FreeBSD 4.10-STABLE #15: Sat Aug 7 13:16:19 JST 2004 root@polymer3.scphys.kyoto-u.ac.jp:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386 >Description: "cat /compat/linux/proc/meminfo" returns bad value about swap size in use. On host with next swap partision: % swapinfo Device 1K-blocks Used Avail Capacity Type /dev/ad0s1b 262016 0 262016 0% Interleaved /dev/rad1s1b 1048448 0 1048448 0% Interleaved Total 1310464 0 1310464 0% "cat /compat/linux/proc/meminfo" shows next values: % cat /compat/linux/proc/meminfo total: used: free: shared: buffers: cached: Mem: 532656128 66535424 466120704 14569472 0 25350144 Swap: 1073741824 18446744073441378304 1341915136 MemTotal: 520172 kB MemFree: 455196 kB MemShared: 14228 kB Buffers: 0 kB Cached: 24756 kB SwapTotal: 1048576 kB SwapFree: 1310464 kB The 2nd column in "Swap:" line is incorrect, and this is due to bad "total swap size" of the 1st column in that line. I guess this value is the size of 2nd swap device. But the unused swap size shows correct size, so the difference of 2 values becomes negative value and shows large long long integer value. >How-To-Repeat: always when 2 swap device is specified. only 1 device does not make such result. >Fix: I don't know. "swapblist" in /usr/src/sys/i386/linux/linprocfs/linprocfs_misc.c might be suspicious.... >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502080856.j188u4sh000755>