Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2003 14:21:40 -0300
From:      "Daniel C. Sobral" <dcs@tcoip.com.br>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        David Schultz <das@FreeBSD.ORG>, Garance A Drosihn <drosih@rpi.edu>, Dan Nelson <dnelson@allantgroup.com>, Wes Peters <wes@softweyr.com>, freebsd-arch@FreeBSD.ORG
Subject:   Re: Patch to protect process from pageout killing
Message-ID:  <3E809024.1050303@tcoip.com.br>
In-Reply-To: <14382.1048580753@critter.freebsd.dk>
References:  <14382.1048580753@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> If we are going to do this, we should do it right.
> 
> Doing it right means that we should also be sharing enough information
> with userland, so that userland can adapt.
> 
> Take a simple example:  It makes sense for a program like fsck to
> use all the RAM it can get hold off as cache, but it does not make
> sense for the cache to be paged out.
> 
> As I see it, there is a need for several mechanisms:

SIGDANGER actually takes care of two of these steps:

> 
> 1. A mechanism to export to userland enough information about the
>    current RAM availability, so that phkmalloc and application
>    specific code can make intelligent choices before things go bad.
> 
> 2. A mechanism to alert userland to the fact that things _have_ gone
>    bad.

SIGDANGER is sent to processes at threshold #1, alerting them the 
situation has become serious.

> 3. A mechanism to influence the "Who do we kill ?" decision once
>    things have gone from bad to worse.

When the situation becomes so critical that the system cannot proceed 
without first killing something, it will only kill a process which has 
registered SIGDANGER if there are no other suitable process.

-- 
Daniel C. Sobral                   (8-DCS)
Gerencia de Operacoes
Divisao de Comunicacao de Dados
Coordenacao de Seguranca
TCO
Fones: 55-61-313-7654/Cel: 55-61-9618-0904
E-mail: Daniel.Capo@tco.net.br
         Daniel.Sobral@tcoip.com.br
         dcs@tcoip.com.br

Outros:
	dcs@newsguy.com
	dcs@freebsd.org
	capo@notorious.bsdconspiracy.net

If you put your supper dish to your ear you can hear the sounds of a
restaurant.
		-- Snoopy


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E809024.1050303>