From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 13:03:03 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F081C16A481 for ; Fri, 4 Jan 2008 13:03:03 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA9D13C458 for ; Fri, 4 Jan 2008 13:03:03 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so3612906uge.37 for ; Fri, 04 Jan 2008 05:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=dNVrgIL2qP5uc0PBDlUHwoSGTPLhB8bhmKAY/xitfzs=; b=lgd+iEpxezEFJ1D7/OArix0djxgIkjtKLiV7jNPTwGYjpwYEgc71FHDqufhBdEalKVW3jPsG6zwTT/EST9bZd6G38oDKMq1tNXxm2wfL1hyD9CiOjSwE5qvC65GSzP4Tc4iYHdVepc6iGfe5d3M+EMbbHWMWKiML1DZ2ab3Ey9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=xNA8zB6UZrGatqkLkZV6WGW37tVat2l5RhQYg4R8mbyAnkv8gXN/PzATvYUtw8wd4hoDeAJ8DpR7JMv001jwHCQ2kq+NSgFnndvyj7744/DoViNUln5aOM082p8cCksLYSOYV/fY0PK6jypBrbWItAvNiy5znmURj+R5cQBL7uc= Received: by 10.67.116.15 with SMTP id t15mr1347142ugm.21.1199451781996; Fri, 04 Jan 2008 05:03:01 -0800 (PST) Received: by 10.66.248.11 with HTTP; Fri, 4 Jan 2008 05:03:01 -0800 (PST) Message-ID: Date: Fri, 4 Jan 2008 13:03:01 +0000 From: "Igor Mozolevsky" Sender: mozolevsky@gmail.com To: "Poul-Henning Kamp" In-Reply-To: <5647.1199451237@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <86myrlahee.fsf@ds4.des.no> <5647.1199451237@critter.freebsd.dk> X-Google-Sender-Auth: cf87e6e2b8316bf5 Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-current@freebsd.org, Robert Watson , Jason Evans Subject: Re: sbrk(2) broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 13:03:04 -0000 On 04/01/2008, Poul-Henning Kamp wrote: > SIGDANGER is not what we need. > > What we need is an intelligent mechanism to tell applications what > the overall situation is, so that jemalloc and aware applications can > tune their usage pattern to the availability of physical and virtual > memory. > > Instead of the binary "SIGDANGER" indication we need a more gradual > state, at the very least three stats: "plenty", "getting a bit > tight" and "crunchtime". This makes memory management in the userland hideously and unnecessarily complicated. It's simpler to have SIGDANGER (meaning, free all you can) -> SIGTERM (terminate gracefully) -> SIGKILL (too late, I'm killing you anyway); and maybe a MIB in sysctl like ...vm.overcommit_action ='soft' being SIGDANGER->SIGTERM->SIGKILL and = 'hard' being SIGKILL, so the sysadmin at least has a choice Igor