From: Alexander Nikiforov <a.nikiforov-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Kirill A. Shutemov"
<kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
KAMEZAWA Hiroyuki
<kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
Dmitry Solodkiy
<d.solodkiy-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
eparis-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
npiggin-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org
Subject: Re: [RFD/RFC v2] event about group change
Date: Thu, 03 May 2012 13:17:39 +0400 [thread overview]
Message-ID: <4FA24D33.7080202@samsung.com> (raw)
In-Reply-To: <20120428214131.GB4586-9pTldWuhBndy/B6EtB590w@public.gmane.org>
On 04/29/2012 01:41 AM, Tejun Heo wrote:
> Hello,
>
> On Sat, Apr 28, 2012 at 09:40:49AM +0400, Alexander Nikiforov wrote:
>>> git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-3.5
>> About for-3.5 - sure. I'll do it. Sorry, but what is SOB? :)
> Signed-off-by tag. Sorry about the abbreviation.
done
>
>>> Also, can you please cc fsnotify people so that they can go over the
>>> new usage?
>> Done. But unfortunately mail from my box not reach Li Zefan. Routing loop.
> His new mail address is lizefan-hv44wF8Li92Xj1p+fO2waQ@public.gmane.org
done
>
>>>> @@ -179,6 +179,8 @@ struct cgroup {
>>>> struct cgroup *parent; /* my parent */
>>>> struct dentry __rcu *dentry; /* cgroup fs entry, RCU protected */
>>>>
>>>> + struct dentry *tasks_dentry; /* "tasks" dentry */
>>> Urgh... not the prettiest but I suppose it's necessary. It will
>>> probably be better to point to cfent instead.
>> Are you talking about struct cftype. If yes, I think for now put
>> tasks_dentry into cgroup better. But if we can take dentry directly
>> from cftype (look on this, for now I have no idea how can I do it)
>> it will be of course better. If we can't take, we will have pointer
>> to every file inside cgroup. Since for memcg we have different event
>> approach, I don't think this proper way.
> If you look at cgroup/for-3.5 branch, there's new entry named struct
> cfent representing each instance of the file which has a pointer to
> the matching dentry.
done
>
>>>> +{
>>>> + struct cgroupfs_root *root;
>>>> + struct inode *d_inode;
>>>> + struct cgroup *cgrp;
>>> What are the locking rules?
>> fsnotify_cgroup() called inside cgroup_lock(), is it not sufficient??
> I was hoping for lockdep_assert_held() annotation. :)
done
>
>>> Wouldn't it be better to make cgroup_add_file() return the created cft
>>> and let the caller handle the tasks special case? Also, why use 1/0
>>> for boolean values instead of true/false?
>> How can I understand that this cft from tasks, only with strcmp with
>> name. Don't think this is the best way, but my way ugly too.
>> About 1/0 try to write on current way, just made it like run_callbacks
> I meant separating out "task" cftype entry and creating it separately
> using a function returning the created cfent and storing it. Instead
> of putting the special logic inside file creation function.
done
>
> Thanks.
>
Please review new version
Thanks
--
Best regards,
Alex Nikiforov,
Mobile SW, Advanced Software Group,
Moscow R&D center, Samsung Electronics
next prev parent reply other threads:[~2012-05-03 9:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 6:02 [RFD/RFC v2] event about group change Alexander Nikiforov
[not found] ` <4F98E4E5.6020602-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-04-26 6:04 ` Alexander Nikiforov
[not found] ` <4F98E57E.1040201-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-04-26 6:09 ` Alexander Nikiforov
2012-04-27 22:34 ` Tejun Heo
[not found] ` <20120427223455.GU26595-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-04-28 5:40 ` Alexander Nikiforov
[not found] ` <4F9B82E1.3070602-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-04-28 21:41 ` Tejun Heo
[not found] ` <20120428214131.GB4586-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-05-03 9:17 ` Alexander Nikiforov [this message]
2012-05-03 9:21 ` [PATCH -V3 1/1] cgroup: Add inotify event on change tasks file (fork, exit, move pid from file) Alexander Nikiforov
[not found] ` <4FA24E07.1010206-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-05-03 15:50 ` Tejun Heo
[not found] ` <20120503155012.GB5528-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-05-04 12:55 ` Alexander Nikiforov
[not found] ` <4FA3D1D0.8000403-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-05-04 16:54 ` Tejun Heo
[not found] ` <20120504165433.GC24639-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-05-05 3:50 ` Alexander Nikiforov
2012-05-05 5:50 ` [PATCH V5] event about group change Alex Nikiforov
[not found] ` <1336197047-22145-1-git-send-email-a.nikiforov-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-05-05 5:50 ` [PATCH V5] Currently, user can get inotify FS_MODIFY event only if "tasks" file changed from the user space side (for example echo $$ > /patch/to/cgroup/tasks), but if another process forked user don't get FS_MODIFY event. This patch add this feature. With this user can get FS_MODIFY on do_fork()/do_exit()/move PID from one group to another Alex Nikiforov
2012-05-05 5:58 ` [PATCH -V3 1/1] cgroup: Add inotify event on change tasks file (fork, exit, move pid from file) Alexander Nikiforov
2012-05-03 20:05 ` Eric Paris
2012-05-04 5:24 ` Alexander Nikiforov
[not found] ` <4FA36818.9010409-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-05-04 17:04 ` Tejun Heo
[not found] ` <20120504170412.GD24639-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-05-04 17:43 ` Al Viro
[not found] ` <20120504174330.GS6871-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2012-05-07 20:38 ` Tejun Heo
[not found] ` <20120507203848.GL19417-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-05-15 15:16 ` Tejun Heo
[not found] ` <20120515151637.GD6119-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-05-15 15:25 ` Eric Paris
2012-05-15 15:28 ` Tejun Heo
[not found] ` <20120515152844.GE6119-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-05-22 5:31 ` Alexander Nikiforov
2012-04-28 5:15 ` [RFD/RFC v2] event about group change Alexander Nikiforov
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=4FA24D33.7080202@samsung.com \
--to=a.nikiforov-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=d.solodkiy-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=eparis-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
--cc=kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=npiggin-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.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).