From nobody Tue Jun 8 09:00:52 2021 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 11C98F7973D for ; Tue, 8 Jun 2021 10:42:23 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "nuc.oldach.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzmyk10zlz3vD8 for ; Tue, 8 Jun 2021 10:42:21 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.16.1/8.16.1/hmo17dec20) with ESMTPS id 158AgIFU099676 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 8 Jun 2021 12:42:18 +0200 (CEST) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.16.1/8.16.1/Submit) id 158AgIEZ099674 for freebsd-stable@freebsd.org; Tue, 8 Jun 2021 12:42:18 +0200 (CEST) (envelope-from freebsd@oldach.net) Message-Id: <202106081042.158AgIEZ099674@nuc.oldach.net> Subject: Re: Where might memory be reported? In-Reply-To: from Dewayne Geraghty at "8 Jun 2021 15:58:37" To: freebsd-stable@freebsd.org Date: Tue, 8 Jun 2021 11:00:52 +0200 (CEST) From: freebsd@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Tue, 08 Jun 2021 12:42:18 +0200 (CEST) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Rspamd-Queue-Id: 4Fzmyk10zlz3vD8 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=freebsd@oldach.net X-Spamd-Result: default: False [-0.30 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:67c:1407:60::1:from]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:67c:1407:60::1:from:127.0.2.255]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_NO_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_NA(0.00)[oldach.net]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; MAILMAN_DEST(0.00)[freebsd-stable] X-ThisMailContainsUnwantedMimeParts: N Dewayne Geraghty wrote on Tue, 08 Jun 2021 07:58:37 +0200 (CEST): > More relevant is > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234559 > where Mark Johnson advised (in Feb '19) > "I've thought about this some more and decided to close this bug WONTFIX > for now. Basically, we started lazily dequeuing wired pages to avoid > the page queue synchronization cost incurred by frequent wirings. The > result is that wired pages may temporarily be counted as > active/inactive/laundry despite not being reclaimable. Maintaining the > previous behaviour wrt statistics would introduce synchronization > overhead that we've been trying to avoid in past and future work. I > don't plan to change the current behaviour and there doesn't seem to be > a compelling reason to do so, at least based on this report. If you or > anyone else would like to discuss this further or describe a use-case > that depends on the old behaviour, please feel free to re-open the bug." Not sure if it applies here. The situation in that ticket (which was, coincidentally, raised by me) was that the sum of all specific page counts was *higher* than the total page count. The explanation is, briefly, double counting some pages. The situation here is different: > Consider this output from a 12.2-STABLE box (r368820) on amd64: > > # sysctl vm.stats.vm | grep count > vm.stats.vm.v_cache_count: 0 > vm.stats.vm.v_user_wire_count: 0 > vm.stats.vm.v_laundry_count: 0 > vm.stats.vm.v_inactive_count: 121191 > vm.stats.vm.v_active_count: 20836 > vm.stats.vm.v_wire_count: 754310 > vm.stats.vm.v_free_count: 254711 > vm.stats.vm.v_page_count: 3993253 > > It should be pretty clear that there are missing pages. Where might they be and > how might I find out? The sum of all specific page counts here is much *lower* than the total v_page_count. We are *missing* pages. Did I misunderstand the case perhaps? Kind regards Helge