From owner-freebsd-hackers@freebsd.org Wed Jan 27 16:55:42 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8578AA70BF0 for ; Wed, 27 Jan 2016 16:55:42 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9F81C63; Wed, 27 Jan 2016 16:55:42 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi0-x234.google.com with SMTP id r14so9282745oie.0; Wed, 27 Jan 2016 08:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3vtlBBIwt5fufmrPZml9gaGbeIaFSSR7xIsIM0qm3fY=; b=eSUYDdZfnwBqXbYkk7PJJ/H00F+ZpDThBmXD+WSTJ4dLUu9+m+jmZLXB+lEw7PpkmC ePA84FU+lEIBJlC7BIGqwvibYjmJSnx2pwE3SiYv0o/upfL30VRwNJi3nMrY1RjhWk3q Mq1xh+SZU3TiIzPNa3eb/xvpQ1uOuRwIBELMzPJpLkOedLaHj5RogV5lWtc6g0ozaTL6 dlsHqvief2b5zX9jfyjE4Vv/2tS1GpzS9ZjorpK6x2TFNIo1RBiPMAslDrXM6xbfJz/y Qvy8FjS9fXl/SWk4stJhZ691xMBD4rYZAZEWur7TypKmC/TaJSbGub2y9iAXP3C31VCP hdhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3vtlBBIwt5fufmrPZml9gaGbeIaFSSR7xIsIM0qm3fY=; b=e303l8snAAUix1pRyfQe1JkKb4bjSnGCqP51zlF+qJipPRLSFcPcasQQB3ASjuSjWt W3ZVETLUQIa41/oP/qdFNAXy8PWkifV9wjww4ps6aGSuTd2KxTy6j1dwYOtxgOZWlsP5 f5+0Yaeujtgs5oQP/u4An/FYAS3Z4NnO+1lomCNbNXA6DHTr2k4WAFHlWPNKaDKix8QW tGR0rklyc9NWfo0K+7Y7YTKyo9P8NNFymyXuUtnuaDMynpBvplmUUhf9rQxJ5bnLbyul zCLSnSOWKzsMCII2es1GfjyFcKEnYLzLent9hU545sdudefBHNrQJMrnF9jc26+X6/fA NJCA== X-Gm-Message-State: AG10YORbeD2P738BHs3sOEmMENGnuqX/QJMvWN/6rO6FNq84TZlRzq7gKeEiW0ZFkDeMtfRFViB2i7nuli7kYQ== MIME-Version: 1.0 X-Received: by 10.202.85.194 with SMTP id j185mr22078346oib.107.1453913741499; Wed, 27 Jan 2016 08:55:41 -0800 (PST) Sender: asomers@gmail.com Received: by 10.202.69.86 with HTTP; Wed, 27 Jan 2016 08:55:41 -0800 (PST) In-Reply-To: <56A8F5D4.2070901@freebsd.org> References: <56A86D91.3040709@freebsd.org> <56A8F5D4.2070901@freebsd.org> Date: Wed, 27 Jan 2016 09:55:41 -0700 X-Google-Sender-Auth: 5T50ouW2LuhfDYOckWK0gp-yI9g Message-ID: Subject: Re: syslogd(8) with OOM Killer protection From: Alan Somers To: Allan Jude Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 16:55:42 -0000 On Wed, Jan 27, 2016 at 9:52 AM, Allan Jude wrote: > On 2016-01-27 11:36, Warren Block wrote: >> On Wed, 27 Jan 2016, Allan Jude wrote: >> >>> On 2016-01-27 01:21, Marcelo Araujo wrote: >>>> Hi guys, >>>> >>>> I would like to know your opinion about this REVIEW[1]. >>>> The basic idea is protect by default the syslogd(8) against been >>>> killed by >>>> OOM with an option to disable the protection. >>>> >>>> Some people like the idea, other people would prefer something more >>>> global >>>> where we can protect any daemon by the discretion of our choice. >>>> >>>> Thoughts? >>>> >>>> >>>> [1] https://reviews.freebsd.org/D4973 >>>> >>>> >>>> Best, >>>> >>> >>> I do like the idea of generalizing it, say via rc.subr >>> >>> So you can just do: >>> >>> someapp_protect=YES (and maybe syslogd has this enabled by default in >>> /etc/defaults/rc.conf) and it prefixes the start command with protect -i. >> >> Possibly simpler to provide a list in one setting than an individual >> setting for each daemon. With ideas from other posters: >> >> oomprotect_daemons="crond syslogd" >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > The only reason I went for daemon_protect="YES" was for ease of > implementation. It would just be another command prefix like: _nice, > _fib, or _env > > -- > Allan Jude > I agree with Allan. We already have a lot of _foo variables. But there aren't any foo_daemons variables. For consistency's sake, we should use _protect or _oomprotect. -Alan