From owner-freebsd-current@FreeBSD.ORG Mon Jan 7 13:15:30 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 B480B16A417 for ; Mon, 7 Jan 2008 13:15:30 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id 4532513C448 for ; Mon, 7 Jan 2008 13:15:29 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so4278292uge.37 for ; Mon, 07 Jan 2008 05:15:28 -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=QSbyBtC+ahiGDY0ByClm58iEwfZYr1bLrpcM/uMQCu0=; b=gTevBbhoSmbFH9nxVITz5lrWUGC4mojjGutlz3nrLWh3myuBbHTgiPRr/7XI8hnuBDvZ3Q8kZFUIbtx9ylz+3ryMhBkK7IKGnqqYgWN7nJicZyXYy96WdHA6Bh8ylH4Xj2PuNg3Ke5wDZQ45RLDFxRz33Te5QssE9MgQHcuvGQY= 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=sreM7OesvKJLqUbk3cVfmG7setsk2yVGQOsI3n0dmSwkKBtfJoe581U/RJjyvD8PpcqvLSE4CA7q+0bMQ3mWBIOdMJzPiGB3R0zUw6lEVMxyw6dAw4y7hClmsKxxzRiVmowD9P+W9AQA89SdMmKmtt7NAj0x6PCgy8IYxu1s+wo= Received: by 10.67.115.17 with SMTP id s17mr7383945ugm.56.1199711728684; Mon, 07 Jan 2008 05:15:28 -0800 (PST) Received: by 10.66.248.11 with HTTP; Mon, 7 Jan 2008 05:15:28 -0800 (PST) Message-ID: Date: Mon, 7 Jan 2008 13:15:28 +0000 From: "Igor Mozolevsky" Sender: mozolevsky@gmail.com To: "Poul-Henning Kamp" In-Reply-To: <9113.1199700321@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080107095853.GR947@server.vk2pj.dyndns.org> <9113.1199700321@critter.freebsd.dk> X-Google-Sender-Auth: b093fe48d4d218b6 Cc: Kostik Belousov , Peter Jeremy , freebsd-current@freebsd.org 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: Mon, 07 Jan 2008 13:15:30 -0000 On 07/01/2008, Poul-Henning Kamp wrote: > In message <20080107095853.GR947@server.vk2pj.dyndns.org>, Peter Jeremy writes: > > >>This is a non-starter, if SIGDANGER is to have any effect, all > >>processes that use malloc(3) should react to it. > > > >This depends on what SIGDANGER is supposed to indicate. IMO, a single > >signal is inadequate - you need a "free memory is less than desirable, > >please reduce memory use if possible" and one (or maybe several levels > >of) "memory is really short, if you're not important, please die". > > That's what I have been advocating for the last 10 years... That makes the userland side of unnecessarily overcomplicated. If a process handles SIGDANGER then let it do so and assume it's important enough to be left alone, if a process doesn't handle SIGDANGER then send SIGTERM to them then SIGKILL; but in any case SIGTERM *should* precede SIGKILL - the processes ought to be allowed to terminate gracefully. Igor :-)