svn commit: r362036 - head/sys/compat/linux

Mark Johnston markj at FreeBSD.org
Wed Jun 10 23:52:40 UTC 2020


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;
 


More information about the svn-src-head mailing list