From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [PATCH] Add a 'trigger' callback on struct cftype. Date: Tue, 11 Mar 2008 19:21:46 +0300 Message-ID: <47D6B19A.3080906@openvz.org> References: <47D6A36F.2080706@openvz.org> <6599ad830803110900j7d47bd6eqf8747bdb704c9226@mail.gmail.com> <47D6AF98.4030204@openvz.org> <6599ad830803110916i1bbc7c7an2412c0facb3496ef@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6599ad830803110916i1bbc7c7an2412c0facb3496ef-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Paul Menage Cc: Linux Containers , Balbir Singh List-Id: containers.vger.kernel.org Paul Menage wrote: > On Tue, Mar 11, 2008 at 9:13 AM, Pavel Emelyanov wrote: >> --- a/include/linux/cgroup.h >> +++ b/include/linux/cgroup.h >> @@ -243,7 +243,7 @@ struct cftype { >> >> */ >> int (*write_s64) (struct cgroup *cgrp, struct cftype *cft, s64 val); >> >> - void (*trigger) (struct cgroup *cgrp, unsigned int event); >> + int (*trigger) (struct cgroup *cgrp, unsigned int event); > > To be more name-compatible with the other read_X/write_X functions, > how about write_void rather than trigger? Because it's not a write actually, this is just some kick-up which came from the user space. And the fact, that it is triggered via the sys_write is just a VFS-based API constraints. Besides, if we ever have a binary API with cgroups, this trigger can be triggered :) via some other system call, rather than write. > Paul >