All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars Marowsky-Bree <lmb@suse.de>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: [ANNOUNCE] multipath-tools-0.4.4
Date: Mon, 25 Apr 2005 11:28:09 +0200	[thread overview]
Message-ID: <20050425092809.GE32085@marowsky-bree.de> (raw)
In-Reply-To: <1114381619.10011.29.camel@zezette>

On 2005-04-25T00:26:58, christophe varoqui <christophe.varoqui@free.fr> wrote:

> 	* the daemon sets /proc/self/oom_adj to -17, hence is 
> 	  protected from the oom killer. Watch out for leaks.

I just cross-checked this. Quoting /usr/src/linux/fs/proc/base.c:
static ssize_t oom_adjust_write(struct file * file, const char * buf,
                                size_t count, loff_t *ppos)
{
        struct task_struct *task = proc_task(file->f_dentry->d_inode);
        char buffer[8], *end;
        int oom_adjust;

        if (!capable(CAP_SYS_RESOURCE))
                return -EPERM;
        memset(buffer, 0, 8);   
        if (count > 6)
                count = 6;
        if (copy_from_user(buffer, buf, count)) 
                return -EFAULT;
        oom_adjust = simple_strtol(buffer, &end, 0);
        if (oom_adjust < -16 || oom_adjust > 15)
                return -EINVAL;
        if (*end == '\n')
                end++;
        task->oomkilladj = oom_adjust;
        if (end - buffer == 0) 
                return -EIO;
        return end - buffer;
}

I doubt that set_oom_adj() has ever worked, unless your kernel is different
from mine in this regard... Checking the return value on fprintf()/fclose()
might have caught this earlier.


Sincerely,
    Lars Marowsky-Brée <lmb@suse.de>

-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business

  reply	other threads:[~2005-04-25  9:28 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25  0:24 [ANNOUNCE] multipath-tools-0.2.9 christophe varoqui
2004-09-25  0:24 ` christophe varoqui
2004-10-06  9:22 ` [ANNOUNCE] multipath-tools-0.3.0 christophe.varoqui
2004-10-06  9:22   ` christophe.varoqui
2004-10-06  9:50   ` [dm-devel] " Lars Marowsky-Bree
2004-10-06  9:50     ` Lars Marowsky-Bree
2004-10-06 10:18     ` christophe.varoqui
2004-10-06 10:18       ` christophe.varoqui
2004-10-11 12:00       ` Lars Marowsky-Bree
2004-10-11 12:00         ` Lars Marowsky-Bree
2004-10-11 12:31         ` christophe.varoqui
2004-10-11 12:31           ` christophe.varoqui
2004-10-07 20:01   ` Dave Olien
2004-10-07 20:01     ` Dave Olien
2004-10-08 12:49     ` christophe.varoqui
2004-10-08 12:49       ` christophe.varoqui
2004-10-11 11:50   ` [ANNOUNCE] multipath-tools-0.3.1 christophe.varoqui
2004-10-11 11:50     ` christophe.varoqui
2004-10-12 18:35     ` Dave Olien
2004-10-12 18:35       ` Dave Olien
2004-10-17 14:03     ` multipath-tools-0.3.2 christophe varoqui
2004-10-17 14:03       ` multipath-tools-0.3.2 christophe varoqui
2004-10-20 10:46       ` [ANNOUNCE] multipath-tools-0.3.3 christophe.varoqui
2004-10-20 10:46         ` christophe.varoqui
2004-10-24 22:14         ` [ANNOUNCE] multipath-tools-0.3.4 christophe varoqui
2004-10-24 22:14           ` christophe varoqui
2004-10-25  8:22           ` Arjan van de Ven
2004-10-25  8:22             ` Arjan van de Ven
2004-10-25  9:38             ` christophe.varoqui
2004-10-25  9:38               ` christophe.varoqui
2004-10-25 10:39               ` Douglas Gilbert
2004-10-25 10:39                 ` Douglas Gilbert
2004-10-25 21:03               ` [dm-devel] " Lars Marowsky-Bree
2004-10-25 21:03                 ` Lars Marowsky-Bree
2004-10-26 17:52                 ` Mike Christie
2004-10-26 17:52                   ` Mike Christie
2004-10-26 10:06           ` [ANNOUNCE] multipath-tools-0.3.5 christophe.varoqui
2004-10-26 10:06             ` christophe.varoqui
2004-11-01 17:08             ` [ANNOUNCE] multipath-tools-0.3.6 christophe varoqui
2004-11-01 17:08               ` christophe varoqui
2004-11-11 23:10               ` [ANNOUNCE] multipath-tools-0.3.7 christophe varoqui
2004-11-11 23:10                 ` christophe varoqui
2004-11-25 14:55                 ` [ANNOUNCE] multipath-tools-0.3.8 christophe varoqui
2004-11-25 14:55                   ` christophe varoqui
2004-12-05 15:43                   ` [ANNOUNCE] multipath-tools-0.3.9 christophe varoqui
2004-12-05 15:43                     ` christophe varoqui
2004-12-12 17:20                     ` [ANNOUNCE] multipath-tools-0.4.0 christophe varoqui
2004-12-12 17:20                       ` christophe varoqui
2004-12-12 18:08                       ` ISCSI Guy
2004-12-12 18:55                         ` ISCSI Ming Zhang
2004-12-12 21:07                           ` ISCSI Guy
2004-12-12 21:12                             ` ISCSI Ming Zhang
2004-12-20 16:01                     ` [ANNOUNCE] multipath-tools-0.4.1 christophe varoqui
2004-12-20 16:01                       ` christophe varoqui
2005-01-23 23:03                       ` [ANNOUNCE] multipath-tools-0.4.2 christophe varoqui
2005-01-23 23:03                         ` christophe varoqui
2005-03-19 14:27                     ` [ANNOUNCE] multipath-tools-0.4.3 christophe varoqui
2005-03-19 14:27                       ` christophe varoqui
2005-04-24 22:26                       ` [ANNOUNCE] multipath-tools-0.4.4 christophe varoqui
2005-04-24 22:26                         ` christophe varoqui
2005-04-25  9:28                         ` Lars Marowsky-Bree [this message]
2004-12-21 22:02 [dm-devel] [ANNOUNCE] multipath-tools-0.4.1 Caushik, Ramesh
2004-12-21 22:02 ` Caushik, Ramesh
2004-12-21 23:03 ` christophe varoqui
2004-12-22  1:09   ` christophe varoqui
2004-12-21 23:19   ` christophe varoqui
2004-12-22  1:26     ` christophe varoqui
2004-12-22 19:26 Caushik, Ramesh
2004-12-22 19:26 ` Caushik, Ramesh
2004-12-22 19:45 ` christophe varoqui
2004-12-22 21:52   ` christophe varoqui
2004-12-22 21:05 James.Smart
2004-12-22 21:05 ` James.Smart
2004-12-22 21:23 ` christophe varoqui
2004-12-22 23:30   ` christophe varoqui
2004-12-22 21:54 Caushik, Ramesh
2004-12-22 21:54 ` Caushik, Ramesh
2004-12-23 13:28 ` Christoph Hellwig
2004-12-23 13:28   ` Christoph Hellwig
2004-12-23 12:19 James.Smart
2004-12-23 12:19 ` James.Smart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050425092809.GE32085@marowsky-bree.de \
    --to=lmb@suse.de \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.