From owner-freebsd-arch@FreeBSD.ORG Fri Nov 20 08:22:08 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1E9F106566B for ; Fri, 20 Nov 2009 08:22:08 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185]) by mx1.freebsd.org (Postfix) with ESMTP id A16FC8FC16 for ; Fri, 20 Nov 2009 08:22:08 +0000 (UTC) Received: by pzk15 with SMTP id 15so2138529pzk.3 for ; Fri, 20 Nov 2009 00:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=6DbT1Y67RtCmVtZvXgsrDjuckHEuzuN9HScBiX56s1E=; b=iBbJxnKaNJCc/HZoQVVLSaOzB9O0vxAm/JMEuqZ4Z5LJ7ybr4JKeY8wQmZqeEosW/U mOyInqeGH+OYuaFQo2AfPnIF9+nsLfg9UKzIIk+4NFHPB5nbfG/dN9XO537zz10sM9Fo 4f+X7A83AOscvK39Jj4qEcfQFVD6fKcs4KODI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=H5PXdFeXEr+SDek9N7Uyk1cuc7IIYXAwuccl1uHaR1/J5rN61afB64/0jTj5UrPBhk gSq6KWa+jdvBBZfSaa0jKnHMbrUBBjMlHcWv9OxXD9DRiPTeAp29ojuZO2nBxL+2KFu9 tm6rgtkMJtNlk5B9p88jiz3Xy3pAbikKvnSVM= MIME-Version: 1.0 Sender: gordon.tetlow@gmail.com Received: by 10.114.214.36 with SMTP id m36mr1684131wag.172.1258705327772; Fri, 20 Nov 2009 00:22:07 -0800 (PST) In-Reply-To: <20091120062637.GA49534@server.vk2pj.dyndns.org> References: <3bbf2fe10911160702m3641b65cv15ac2942cbb023fd@mail.gmail.com> <7i8we5xlbm.wl%gnn@neville-neil.com> <30DCA579-53AD-49EA-A5A2-5A0796A285C1@gmail.com> <20091120062637.GA49534@server.vk2pj.dyndns.org> Date: Fri, 20 Nov 2009 00:22:07 -0800 X-Google-Sender-Auth: b70abe6cbb28e54b Message-ID: <4e571dd70911200022m2c5f4a7eje72df480f236f576@mail.gmail.com> From: Gordon Tetlow To: Peter Jeremy Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Rui Paulo , Attilio Rao , FreeBSD Arch , gnn@freebsd.org Subject: Re: [PATCH] Protect inetd and cron from being killed under high-pressure swapping X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 08:22:09 -0000 On Thu, Nov 19, 2009 at 10:26 PM, Peter Jeremy wrote: > On 2009-Nov-17 21:35:34 +0000, Rui Paulo wrote: > >> At Mon, 16 Nov 2009 16:02:08 +0100, > >> Attilio Rao wrote: > >>> > >>> This simple patch protects inetd and cron from being killed under > >>> high-pressure swapping systems: > >>> > http://www.freebsd.org/~attilio/Sandvine/STABLE_8/madvised/madvised.diff > > >Yes, the idea is good, but should we really trust inetd and crond that > much ? > >Are there other daemons that do this? > > As an alternative approach, how about placing a wrapper process around > them which will restart them if they die? init(8) unofficially provides > this (I've used it in the past) - maybe we should formalise this. > Restarting cron can be dicey. @reboot tasks run and could cause problems. I think protecting certain important processes from being killed in low memory situations is a smart idea.