From: aq <aquynh@gmail.com>
To: johnpol@2ka.mipt.ru
Cc: Andrew Morton <akpm@osdl.org>,
guillaume.thouvenin@bull.net, alexn@dsv.su.se,
linux-kernel@vger.kernel.org, jlan@engr.sgi.com,
elsa-devel@lists.sourceforge.net
Subject: Re: [PATCH 2.6.12-rc3-mm3] connector: add a fork connector
Date: Tue, 10 May 2005 20:13:43 +0900 [thread overview]
Message-ID: <9cde8bff0505100413422104a6@mail.gmail.com> (raw)
In-Reply-To: <20050510014359.074109d8@zanzibar.2ka.mipt.ru>
On 5/10/05, Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> On Mon, 9 May 2005 14:08:36 -0700
> Andrew Morton <akpm@osdl.org> wrote:
>
> > Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> > >
> > > > In the previous connector, cn_netlink_send(struct cn_msg *msg, u32
> > > > __groups) called alloc_skb(size, GFP_ATOMIC). Now a third parameter is
> > > > used with cn_netlink_send() in order to call alloc_skb(size, gfp_mask)
> > > > with a specific gfp_mask. So, I'm using GFP_ATOMIC as the third argument
> > > > to keep the same behavior.
> > >
> > > It was atomic there to allow non process context usage.
> > > Since do_fork() is executed in process context you can use GFP_KERNEL with
> > > __GFP_NOFAIL - it will guarantee memory allocation.
> >
> > Please avoid using __GFP_NOFAIL.
> >
> > __GFP_NOFAIL was introduced because we had lots of places in the kernel
> > which were doing:
> >
> > try_again:
> > p = allocate_something();
> > if (!p) {
> > /* A am too lame to handle this */
> > delay_in_some_manner();
> > goto try_again;
> > }
> >
> > __GFP_NOFAIL simply takes the above bad code and centralises it so it's
> > always done in the same way and so that it's easily greppable for. But
> > it's still bad (ie: deadlocky) code.
> >
> > Well-behaved code should notice the allocation failure and should back out
> > gracefully.
>
> If system under so bad conditions that even process context allocation
> fails, then connector may drop message and will return error,
> probably in such conditions one may not even trust accounting data,
> so, Guillaume, feel free to drop it and just do not send data -
> it's only a matter of information importance.
>
what i find most troublesome of this solution is that information
collected by ELSA is not reliable. The reason is that it uses netlink,
which is connectionless. So under heavy pressure, we can lose some
critical accounting data.
At least it would be nice if we can know when and why there are
problems of losing data with netlink. Any solution?
thank you,
aq
next prev parent reply other threads:[~2005-05-10 11:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-09 8:07 [PATCH 2.6.12-rc3-mm3] connector: add a fork connector Guillaume Thouvenin
2005-05-09 9:31 ` Alexander Nyberg
2005-05-09 11:38 ` Guillaume Thouvenin
2005-05-09 11:48 ` Evgeniy Polyakov
2005-05-09 21:08 ` Andrew Morton
2005-05-09 21:43 ` Evgeniy Polyakov
2005-05-10 11:13 ` aq [this message]
2005-05-10 11:24 ` Evgeniy Polyakov
2005-05-09 12:00 ` Nick Piggin
2005-05-09 12:22 ` Alexander Nyberg
2005-05-09 12:43 ` Guillaume Thouvenin
2005-05-09 13:13 ` Guillaume Thouvenin
2005-05-09 13:32 ` aq
2005-05-09 13:57 ` Alexander Nyberg
2005-05-11 11:44 ` Guillaume Thouvenin
2005-05-10 11:18 ` Guillaume Thouvenin
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=9cde8bff0505100413422104a6@mail.gmail.com \
--to=aquynh@gmail.com \
--cc=akpm@osdl.org \
--cc=alexn@dsv.su.se \
--cc=elsa-devel@lists.sourceforge.net \
--cc=guillaume.thouvenin@bull.net \
--cc=jlan@engr.sgi.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
/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.