From nobody Tue Jun 04 20:43:02 2024 X-Original-To: freebsd-arch@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 4Vv2c11sGGz5MWM8 for ; Tue, 04 Jun 2024 20:43:13 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vv2c06DgMz4ndr; Tue, 4 Jun 2024 20:43:12 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Authentication-Results: mx1.freebsd.org; none Received: from critter.freebsd.dk (unknown [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 6D21789333; Tue, 04 Jun 2024 20:43:03 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.18.1/8.16.1) with ESMTPS id 454Kh2u4009156 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 4 Jun 2024 20:43:03 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.18.1/8.16.1/Submit) id 454Kh2ls009155; Tue, 4 Jun 2024 20:43:02 GMT (envelope-from phk) Message-Id: <202406042043.454Kh2ls009155@critter.freebsd.dk> To: Konstantin Belousov cc: John Baldwin , Mark Johnston , freebsd-arch@freebsd.org Subject: Re: removing support for kernel stack swapping In-reply-to: From: "Poul-Henning Kamp" References: <6ddedba5-fc2f-4caa-aab5-bd29ca4fdf0b@FreeBSD.org> List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9153.1717533782.1@critter.freebsd.dk> Date: Tue, 04 Jun 2024 20:43:02 +0000 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU] X-Rspamd-Queue-Id: 4Vv2c06DgMz4ndr Konstantin Belousov writes: > Similarly, it is not easy to shrink the vnode cache in case of memory > shortage, due to need to free the owned pages, and most likely before > that, free the owned buffers which otherwise wire the pages. > Also we need to flush namecache before a vnode can be freed, which is > somewhat unfortunate. Many years ago I asked the then VM-wizards if we could have a global kernel integer variable with a "VM-state-of-the-system" so caches could modulate their behavior. Having something as simple as: 0 - free pizza 1 - dont make it worse 2 - please help would enable most of the caches in the kernel pull the right direction before things get too critical. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.