Date: Wed, 10 Jun 2020 23:52:39 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362036 - head/sys/compat/linux Message-ID: <202006102352.05ANqde3073365@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Jun 10 23:52:39 2020 New Revision: 362036 URL: https://svnweb.freebsd.org/changeset/base/362036 Log: Add a comment reflecting the commit log for r361945. Suggested by: alc Reviewed by: alc MFC with: r361945 Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Wed Jun 10 23:52:29 2020 (r362035) +++ head/sys/compat/linux/linux_misc.c Wed Jun 10 23:52:39 2020 (r362036) @@ -167,6 +167,12 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_ sysinfo.totalram = physmem * PAGE_SIZE; sysinfo.freeram = sysinfo.totalram - vm_wire_count() * PAGE_SIZE; + /* + * sharedram counts pages allocated to named, swap-backed objects such + * as shared memory segments and tmpfs files. There is no cheap way to + * compute this, so just leave the field unpopulated. Linux itself only + * started setting this field in the 3.x timeframe. + */ sysinfo.sharedram = 0; sysinfo.bufferram = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006102352.05ANqde3073365>