From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: containers@lists.linux-foundation.org, linux-mm@kvack.org,
Paul Menage <menage@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Pavel Emelyanov <xemul@openvz.org>,
Dan Malek <dan@embeddedalley.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [PATCH v2 -mmotm 3/4] cgroups: Add simple listener of cgroup events to documentation
Date: Wed, 24 Feb 2010 13:36:30 +0200 [thread overview]
Message-ID: <cc557aab1002240336q2a8cab6evaae228a95ab9f672@mail.gmail.com> (raw)
In-Reply-To: <4B849D4C.2090800@cn.fujitsu.com>
On Wed, Feb 24, 2010 at 5:30 AM, Li Zefan <lizf@cn.fujitsu.com> wrote:
>> + ret = dprintf(event_control, "%d %d %s", efd, cfd, argv[2]);
>
> I found it won't return negative value for invalid input, though
> errno is set properly.
It looks like a glibc bug. I've file bug to glibc bugzilla:
http://sourceware.org/bugzilla/show_bug.cgi?id=11319
I'll fix cgroup_event_listener.c. Thanks!
> try:
> # ./cgroup_event_listner /cgroup/cgroup.procs abc
>
> while strace shows write() does return -1:
>
> # strace ./cgroup_event_listner /cgroup/cgroup.procs abc
> ...
> write(6, "7 5 abc"..., 7) = -1 EINVAL (Invalid argument)
>
>> + if (ret == -1) {
>> + perror("Cannot write to cgroup.event_control");
>> + goto out;
>> + }
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-02-24 11:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 15:43 [PATCH v2 -mmotm 1/4] cgroups: Fix race between userspace and kernelspace Kirill A. Shutemov
2010-02-22 15:43 ` [PATCH v2 -mmotm 2/4] cgroups: remove events before destroying subsystem state objects Kirill A. Shutemov
2010-02-22 15:43 ` [PATCH v2 -mmotm 3/4] cgroups: Add simple listener of cgroup events to documentation Kirill A. Shutemov
2010-02-22 15:43 ` [PATCH v2 -mmotm 4/4] memcg: Update memcg_test.txt to describe memory thresholds Kirill A. Shutemov
2010-02-23 3:19 ` [PATCH v2 -mmotm 3/4] cgroups: Add simple listener of cgroup events to documentation Li Zefan
2010-02-24 3:30 ` Li Zefan
2010-02-24 11:36 ` Kirill A. Shutemov [this message]
2010-02-23 3:18 ` [PATCH v2 -mmotm 2/4] cgroups: remove events before destroying subsystem state objects Li Zefan
2010-02-24 8:40 ` Balbir Singh
2010-02-24 11:42 ` Kirill A. Shutemov
2010-02-24 12:17 ` Balbir Singh
2010-02-23 3:17 ` [PATCH v2 -mmotm 1/4] cgroups: Fix race between userspace and kernelspace Li Zefan
2010-02-24 7:12 ` Balbir Singh
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=cc557aab1002240336q2a8cab6evaae228a95ab9f672@mail.gmail.com \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=dan@embeddedalley.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).