* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry
@ 2010-12-21 8:44 Sedat Dilek
2010-12-21 8:55 ` Nick Piggin
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Sedat Dilek @ 2010-12-21 8:44 UTC (permalink / raw)
To: Nick Piggin; +Cc: systemd-devel, linux-fsdevel, linux-next, eparis
Against linux-next (next-20101210) it should look like:
$ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch
cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch
--- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch
2010-12-21 09:31:38.649601964 +0100
+++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch
2010-12-21 09:40:21.151033232 +0100
@@ -83,7 +83,7 @@
inode->i_size = 0;
inode->i_fop = &cgroup_file_operations;
}
-- dentry->d_op = &cgroup_dops;
+- d_set_d_op(dentry, &cgroup_dops);
d_instantiate(dentry, inode);
dget(dentry); /* Extra count - pin the dentry in core */
return 0;
- Sedat -
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 8:44 [patch] cgroup fs: avoid switching ->d_op on live dentry Sedat Dilek @ 2010-12-21 8:55 ` Nick Piggin 2010-12-21 13:35 ` Sedat Dilek 2010-12-21 18:25 ` Al Viro 2010-12-21 15:12 ` Sedat Dilek 2010-12-21 15:28 ` Sedat Dilek 2 siblings, 2 replies; 11+ messages in thread From: Nick Piggin @ 2010-12-21 8:55 UTC (permalink / raw) To: sedat.dilek; +Cc: linux-fsdevel, linux-next, systemd-devel, Nick Piggin, eparis On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: > Against linux-next (next-20101210) it should look like: Yep, I'll rebase my tree with the fix shortly. > > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > 2010-12-21 09:31:38.649601964 +0100 > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch > 2010-12-21 09:40:21.151033232 +0100 > @@ -83,7 +83,7 @@ > inode->i_size = 0; > inode->i_fop = &cgroup_file_operations; > } > -- dentry->d_op = &cgroup_dops; > +- d_set_d_op(dentry, &cgroup_dops); > d_instantiate(dentry, inode); > dget(dentry); /* Extra count - pin the dentry in core */ > return 0; > > - Sedat - ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 8:55 ` Nick Piggin @ 2010-12-21 13:35 ` Sedat Dilek 2010-12-21 18:25 ` Al Viro 1 sibling, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2010-12-21 13:35 UTC (permalink / raw) To: Nick Piggin; +Cc: linux-fsdevel, linux-next, systemd-devel, eparis On Tue, Dec 21, 2010 at 9:55 AM, Nick Piggin <npiggin@kernel•dk> wrote: > On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: >> Against linux-next (next-20101210) it should look like: > > Yep, I'll rebase my tree with the fix shortly. > >> >> $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> 2010-12-21 09:31:38.649601964 +0100 >> +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> 2010-12-21 09:40:21.151033232 +0100 >> @@ -83,7 +83,7 @@ >> inode->i_size = 0; >> inode->i_fop = &cgroup_file_operations; >> } >> -- dentry->d_op = &cgroup_dops; >> +- d_set_d_op(dentry, &cgroup_dops); >> d_instantiate(dentry, inode); >> dget(dentry); /* Extra count - pin the dentry in core */ >> return 0; >> >> - Sedat - > I just started the compilation due to slow kernel mirrors, I see this warning: $ egrep 'kernel/cgroup.o|kernel/cgroup.c' build_linux-next_next20101221.dileks.1.log CC kernel/cgroup.o /home/sd/src/linux-2.6/linux-2.6.37-rc6/debian/build/source_i386_none/kernel/cgroup.c: In function ‘cgroup_lookup’: /home/sd/src/linux-2.6/linux-2.6.37-rc6/debian/build/source_i386_none/kernel/cgroup.c:2219:3: warning: initialization from incompatible pointer type [ kernel/cgroup.c ] ... static int cgroup_delete_dentry(struct dentry *dentry) { return 1; } static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) { static const struct dentry_operations cgroup_dentry_operations = { .d_delete = cgroup_delete_dentry, <--- LINE #2219 .d_iput = cgroup_diput, }; if (dentry->d_name.len > NAME_MAX) return ERR_PTR(-ENAMETOOLONG); dentry->d_op = &cgroup_dentry_operations; d_add(dentry, NULL); return NULL; } ... Can you fix that with your rebasing, too? Thanks in advance. - Sedat - _______________________________________________ systemd-devel mailing list systemd-devel@lists•freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 8:55 ` Nick Piggin 2010-12-21 13:35 ` Sedat Dilek @ 2010-12-21 18:25 ` Al Viro 2010-12-21 18:57 ` Sedat Dilek ` (2 more replies) 1 sibling, 3 replies; 11+ messages in thread From: Al Viro @ 2010-12-21 18:25 UTC (permalink / raw) To: Nick Piggin; +Cc: sedat.dilek, systemd-devel, linux-fsdevel, linux-next, eparis On Tue, Dec 21, 2010 at 07:55:38PM +1100, Nick Piggin wrote: > On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: > > Against linux-next (next-20101210) it should look like: > > Yep, I'll rebase my tree with the fix shortly. > > > > > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch > > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > > 2010-12-21 09:31:38.649601964 +0100 > > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch > > 2010-12-21 09:40:21.151033232 +0100 > > @@ -83,7 +83,7 @@ > > inode->i_size = 0; > > inode->i_fop = &cgroup_file_operations; > > } > > -- dentry->d_op = &cgroup_dops; > > +- d_set_d_op(dentry, &cgroup_dops); > > d_instantiate(dentry, inode); > > dget(dentry); /* Extra count - pin the dentry in core */ > > return 0; How about not doing that d_set_d_op() at all? See #d_op in vfs-2.6.git; just set ->s_d_op to that once and be done with that. No need to reassign it on a live dentry... ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 18:25 ` Al Viro @ 2010-12-21 18:57 ` Sedat Dilek 2010-12-22 3:11 ` Nick Piggin 2010-12-22 4:38 ` Sedat Dilek 2 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2010-12-21 18:57 UTC (permalink / raw) To: Al Viro; +Cc: Nick Piggin, systemd-devel, linux-fsdevel, linux-next, eparis On Tue, Dec 21, 2010 at 7:25 PM, Al Viro <viro@zeniv•linux.org.uk> wrote: > On Tue, Dec 21, 2010 at 07:55:38PM +1100, Nick Piggin wrote: >> On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: >> > Against linux-next (next-20101210) it should look like: >> >> Yep, I'll rebase my tree with the fix shortly. >> >> > >> > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> > 2010-12-21 09:31:38.649601964 +0100 >> > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> > 2010-12-21 09:40:21.151033232 +0100 >> > @@ -83,7 +83,7 @@ >> > inode->i_size = 0; >> > inode->i_fop = &cgroup_file_operations; >> > } >> > -- dentry->d_op = &cgroup_dops; >> > +- d_set_d_op(dentry, &cgroup_dops); >> > d_instantiate(dentry, inode); >> > dget(dentry); /* Extra count - pin the dentry in core */ >> > return 0; > > How about not doing that d_set_d_op() at all? See #d_op in vfs-2.6.git; > just set ->s_d_op to that once and be done with that. No need to reassign > it on a live dentry... > The kernel mirrors are very slow since yesterday. Checking out and online-browsing your repo [1] is no fun. On a very quick view I don't see a cgroup fix. Can you please offer a revised full patch? Thanks in advance. Personally, I am glad to be able to use systemd, again. - Sedat - [1] http://git.kernel.org/?p=linux/kernel/git/viro/vfs-2.6.git;a=shortlog;h=refs/heads/d_op ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 18:25 ` Al Viro 2010-12-21 18:57 ` Sedat Dilek @ 2010-12-22 3:11 ` Nick Piggin 2010-12-22 3:31 ` Sedat Dilek 2010-12-22 4:38 ` Sedat Dilek 2 siblings, 1 reply; 11+ messages in thread From: Nick Piggin @ 2010-12-22 3:11 UTC (permalink / raw) To: Al Viro Cc: Nick Piggin, sedat.dilek, systemd-devel, linux-fsdevel, linux-next, eparis On Wed, Dec 22, 2010 at 5:25 AM, Al Viro <viro@zeniv•linux.org.uk> wrote: > On Tue, Dec 21, 2010 at 07:55:38PM +1100, Nick Piggin wrote: >> On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: >> > Against linux-next (next-20101210) it should look like: >> >> Yep, I'll rebase my tree with the fix shortly. >> >> > >> > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> > 2010-12-21 09:31:38.649601964 +0100 >> > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> > 2010-12-21 09:40:21.151033232 +0100 >> > @@ -83,7 +83,7 @@ >> > inode->i_size = 0; >> > inode->i_fop = &cgroup_file_operations; >> > } >> > -- dentry->d_op = &cgroup_dops; >> > +- d_set_d_op(dentry, &cgroup_dops); >> > d_instantiate(dentry, inode); >> > dget(dentry); /* Extra count - pin the dentry in core */ >> > return 0; > > How about not doing that d_set_d_op() at all? See #d_op in vfs-2.6.git; > just set ->s_d_op to that once and be done with that. No need to reassign > it on a live dentry... It shouldn't be live there after my patch, but either way it is fixed, doesn't matter. Your s_d_op patch allows more reuse of code, so that looks nicer. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-22 3:11 ` Nick Piggin @ 2010-12-22 3:31 ` Sedat Dilek 0 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2010-12-22 3:31 UTC (permalink / raw) To: Nick Piggin, Al Viro; +Cc: systemd-devel, linux-fsdevel, linux-next, eparis On Wed, Dec 22, 2010 at 4:11 AM, Nick Piggin <npiggin@gmail•com> wrote: > On Wed, Dec 22, 2010 at 5:25 AM, Al Viro <viro@zeniv•linux.org.uk> wrote: >> On Tue, Dec 21, 2010 at 07:55:38PM +1100, Nick Piggin wrote: >>> On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: >>> > Against linux-next (next-20101210) it should look like: >>> >>> Yep, I'll rebase my tree with the fix shortly. >>> >>> > >>> > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >>> > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >>> > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >>> > 2010-12-21 09:31:38.649601964 +0100 >>> > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >>> > 2010-12-21 09:40:21.151033232 +0100 >>> > @@ -83,7 +83,7 @@ >>> > inode->i_size = 0; >>> > inode->i_fop = &cgroup_file_operations; >>> > } >>> > -- dentry->d_op = &cgroup_dops; >>> > +- d_set_d_op(dentry, &cgroup_dops); >>> > d_instantiate(dentry, inode); >>> > dget(dentry); /* Extra count - pin the dentry in core */ >>> > return 0; >> >> How about not doing that d_set_d_op() at all? See #d_op in vfs-2.6.git; >> just set ->s_d_op to that once and be done with that. No need to reassign >> it on a live dentry... > > It shouldn't be live there after my patch, but either way it is fixed, > doesn't matter. Your s_d_op patch allows more reuse of code, so > that looks nicer. > Hi Nick, Hi Al, IIRC that vfs-2.6.git#d_op is not in linux-next? [2] uses "vfs git git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6.git#for-next"? Will this tree go into 2.6.38? I tried to pull that tree into linux-next which resulted into many CONFLICTs. As far as I have understood: To use s_d_op for kernel/cgroup.c at least means to cherry-pick "per-superblock default ->d_op" commit [2]? If Al's tree is expected to be in 2.6.38, it would be good that both vfs-related trees "vfs-2.6#d_op" and "vfs-scale-working" would be coordinated. Can you give details on the plans for 2.6.38 (for linux-next)? Thanks. - Sedat - [1] http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=blob;f=Next/Trees#l84 [2] http://git.kernel.org/?p=linux/kernel/git/viro/vfs-2.6.git;a=commit;h=ee2d6af5897a21441f1ded8c3551da073cbcda87 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger•kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 18:25 ` Al Viro 2010-12-21 18:57 ` Sedat Dilek 2010-12-22 3:11 ` Nick Piggin @ 2010-12-22 4:38 ` Sedat Dilek 2 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2010-12-22 4:38 UTC (permalink / raw) To: Al Viro; +Cc: Nick Piggin, systemd-devel, linux-fsdevel, linux-next, eparis On Tue, Dec 21, 2010 at 7:25 PM, Al Viro <viro@zeniv•linux.org.uk> wrote: > On Tue, Dec 21, 2010 at 07:55:38PM +1100, Nick Piggin wrote: >> On Tue, Dec 21, 2010 at 09:44:40AM +0100, Sedat Dilek wrote: >> > Against linux-next (next-20101210) it should look like: >> >> Yep, I'll rebase my tree with the fix shortly. >> >> > >> > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch >> > 2010-12-21 09:31:38.649601964 +0100 >> > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch >> > 2010-12-21 09:40:21.151033232 +0100 >> > @@ -83,7 +83,7 @@ >> > inode->i_size = 0; >> > inode->i_fop = &cgroup_file_operations; >> > } >> > -- dentry->d_op = &cgroup_dops; >> > +- d_set_d_op(dentry, &cgroup_dops); >> > d_instantiate(dentry, inode); >> > dget(dentry); /* Extra count - pin the dentry in core */ >> > return 0; > > How about not doing that d_set_d_op() at all? See #d_op in vfs-2.6.git; > just set ->s_d_op to that once and be done with that. No need to reassign > it on a live dentry... > Hey, cool :-)! Still waiting to see the content of "switch cgroup" commit in vfs-2.6#d_op GIT from [1] (slow kernel-mirrors [2]). Thank you Al for the quick execution! - Sedat - [1] http://git.kernel.org/?p=linux/kernel/git/viro/vfs-2.6.git;a=commit;h=0438db3de35bc969624794d6b891e2a178e24645 [2] https://lkml.org/lkml/2010/12/21/361 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger•kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 8:44 [patch] cgroup fs: avoid switching ->d_op on live dentry Sedat Dilek 2010-12-21 8:55 ` Nick Piggin @ 2010-12-21 15:12 ` Sedat Dilek 2010-12-21 15:28 ` Sedat Dilek 2 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2010-12-21 15:12 UTC (permalink / raw) To: Nick Piggin; +Cc: systemd-devel, linux-fsdevel, linux-next, eparis [-- Attachment #1: Type: text/plain, Size: 2173 bytes --] On Tue, Dec 21, 2010 at 9:44 AM, Sedat Dilek <sedat.dilek@googlemail•com> wrote: > Against linux-next (next-20101210) it should look like: > > $ diff -Naur cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch > --- cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > 2010-12-21 09:31:38.649601964 +0100 > +++ cgroup-fix/cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch > 2010-12-21 09:40:21.151033232 +0100 > @@ -83,7 +83,7 @@ > inode->i_size = 0; > inode->i_fop = &cgroup_file_operations; > } > -- dentry->d_op = &cgroup_dops; > +- d_set_d_op(dentry, &cgroup_dops); > d_instantiate(dentry, inode); > dget(dentry); /* Extra count - pin the dentry in core */ > return 0; > > - Sedat - > YAY!!! # dmesg | grep systemd [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.37-rc6-686 root=UUID=1ceb69a7-ecf4-47e9-a231-b74e0f0a9b62 ro ini [ 4.124563] systemd[1]: systemd 15 running in system mode. (+PAM -LIBWRAP -AUDIT +SELINUX +SYSVINIT -LIBCRYPTSETUP; debian) [ 4.246090] systemd[1]: Set hostname to <tbox>. [ 6.942949] systemd-logger[290]: Got error on stream: No such process [ 9.011378] systemd-fsck[524]: /dev/sda3: sauber, 128062/640848 Dateien, 1839774/2560359 Blöcke [ 15.186112] systemd[1]: ifupdown-clean.service: control process exited, code=exited status=209 [ 15.186941] systemd[1]: Unit ifupdown-clean.service entered failed state. [ 15.187363] systemd[1]: mountoverflowtmp.service: control process exited, code=exited status=209 [ 15.206223] systemd[1]: Unit mountoverflowtmp.service entered failed state. [ 15.215739] systemd[1]: resolvconf.service: control process exited, code=exited status=209 [ 15.235257] systemd[1]: Unit resolvconf.service entered failed state. Feel free to add: Reported-and-tested-by: Sedat Dilek <sedat.dilek@gmail•com> (Tested with the above v2 patch against linux-next (next-20101221) - see file attachment). - Sedat - [-- Attachment #2: cgroup-fs-avoid-switching-d_op-on-live-dentry-v2.patch --] [-- Type: plain/text, Size: 3277 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 8:44 [patch] cgroup fs: avoid switching ->d_op on live dentry Sedat Dilek 2010-12-21 8:55 ` Nick Piggin 2010-12-21 15:12 ` Sedat Dilek @ 2010-12-21 15:28 ` Sedat Dilek 2010-12-21 17:56 ` Sedat Dilek 2 siblings, 1 reply; 11+ messages in thread From: Sedat Dilek @ 2010-12-21 15:28 UTC (permalink / raw) To: Nick Piggin; +Cc: systemd-devel, linux-fsdevel, linux-next, eparis [-- Attachment #1: Type: text/plain, Size: 1226 bytes --] What about using d_set_d_op() ? - Sedat - $ diff -Naur orig/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch --- orig/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch 2010-12-21 09:31:38.649601964 +0100 +++ cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch 2010-12-21 16:23:29.147497577 +0100 @@ -21,6 +21,9 @@ --- One of the patches in my vfs scaling series tripped over this, comments? +v2: Refreshed to fit linux-next (next-20101220) +v3: Use d_set_d_op() + kernel/cgroup.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) @@ -68,7 +71,7 @@ + if (dentry->d_name.len > NAME_MAX) + return ERR_PTR(-ENAMETOOLONG); -+ dentry->d_op = &cgroup_dentry_operations; ++ d_set_d_op(dentry, &cgroup_dentry_operations); + d_add(dentry, NULL); + return NULL; +} @@ -83,7 +86,7 @@ inode->i_size = 0; inode->i_fop = &cgroup_file_operations; } -- dentry->d_op = &cgroup_dops; +- d_set_d_op(dentry, &cgroup_dops); d_instantiate(dentry, inode); dget(dentry); /* Extra count - pin the dentry in core */ return 0; [-- Attachment #2: cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch --] [-- Type: plain/text, Size: 3303 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] cgroup fs: avoid switching ->d_op on live dentry 2010-12-21 15:28 ` Sedat Dilek @ 2010-12-21 17:56 ` Sedat Dilek 0 siblings, 0 replies; 11+ messages in thread From: Sedat Dilek @ 2010-12-21 17:56 UTC (permalink / raw) To: Nick Piggin; +Cc: systemd-devel, linux-fsdevel, linux-next, eparis On Tue, Dec 21, 2010 at 4:28 PM, Sedat Dilek <sedat.dilek@googlemail•com> wrote: > What about using d_set_d_op() ? > > - Sedat - > > $ diff -Naur orig/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch > --- orig/cgroup-fs-avoid-switching-d_op-on-live-dentry.patch > 2010-12-21 09:31:38.649601964 +0100 > +++ cgroup-fs-avoid-switching-d_op-on-live-dentry-v3.patch > 2010-12-21 16:23:29.147497577 +0100 > @@ -21,6 +21,9 @@ > --- > One of the patches in my vfs scaling series tripped over this, comments? > > +v2: Refreshed to fit linux-next (next-20101220) > +v3: Use d_set_d_op() > + > kernel/cgroup.c | 27 ++++++++++++++++++++++----- > 1 file changed, 22 insertions(+), 5 deletions(-) > > @@ -68,7 +71,7 @@ > > + if (dentry->d_name.len > NAME_MAX) > + return ERR_PTR(-ENAMETOOLONG); > -+ dentry->d_op = &cgroup_dentry_operations; > ++ d_set_d_op(dentry, &cgroup_dentry_operations); > + d_add(dentry, NULL); > + return NULL; > +} > @@ -83,7 +86,7 @@ > inode->i_size = 0; > inode->i_fop = &cgroup_file_operations; > } > -- dentry->d_op = &cgroup_dops; > +- d_set_d_op(dentry, &cgroup_dops); > d_instantiate(dentry, inode); > dget(dentry); /* Extra count - pin the dentry in core */ > return 0; > v3 compiled and running (failed systemd services needs some investigations, but that is another story). BTW, I have enabled some cgroup debug options: # grep -i cgroup /boot/config-$(uname -r) CONFIG_CGROUPS=y CONFIG_CGROUP_DEBUG=y CONFIG_CGROUP_NS=y CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_SCHED=y CONFIG_BLK_CGROUP=y CONFIG_DEBUG_BLK_CGROUP=y CONFIG_NET_CLS_CGROUP=y - Sedat - P.S.: # cat /proc/version Linux version 2.6.37-rc6-686 (Debian 2.6.37~rc6-8~next20101221.dileks.2) (sedat.dilek@gmail•com) (gcc version 4.5.2 (Debian 4.5.2-1) ) #1 SMP Tue Dec 21 18:25:45 CET 2010 # dmesg | egrep -i 'systemd|cgroup' [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.37-rc6-686 root=UUID=1ceb69a7-ecf4-47e9-a231-b74e0f0a9b62 ro init=/bin/systemd radeon.modeset=1 lapic 3 [ 0.004574] Initializing cgroup subsys debug [ 0.004615] Initializing cgroup subsys ns [ 0.004651] ns_cgroup deprecated: consider using the 'clone_children' flag without the ns_cgroup. [ 0.004700] Initializing cgroup subsys cpuacct [ 0.004739] Initializing cgroup subsys devices [ 0.004775] Initializing cgroup subsys freezer [ 0.004810] Initializing cgroup subsys net_cls [ 0.004846] Initializing cgroup subsys blkio [ 4.111878] systemd[1]: systemd 15 running in system mode. (+PAM -LIBWRAP -AUDIT +SELINUX +SYSVINIT -LIBCRYPTSETUP; debian) [ 4.241710] systemd[1]: Set hostname to <tbox>. [ 7.096444] systemd-logger[284]: Got error on stream: No such process [ 9.123292] systemd-fsck[499]: /dev/sda3: sauber, 128016/640848 Dateien, 1788184/2560359 Blöcke [ 15.411402] systemd[1]: ifupdown-clean.service: control process exited, code=exited status=209 [ 15.420338] systemd[1]: Unit ifupdown-clean.service entered failed state. [ 15.420808] systemd[1]: mountoverflowtmp.service: control process exited, code=exited status=209 [ 15.437782] systemd[1]: Unit mountoverflowtmp.service entered failed state. [ 15.451162] systemd[1]: resolvconf.service: control process exited, code=exited status=209 [ 15.470512] systemd[1]: Unit resolvconf.service entered failed state. [ 15.480271] systemd[1]: policykit.service: control process exited, code=exited status=209 [ 15.500513] systemd[1]: Unit policykit.service entered failed state. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-12-22 4:38 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-12-21 8:44 [patch] cgroup fs: avoid switching ->d_op on live dentry Sedat Dilek 2010-12-21 8:55 ` Nick Piggin 2010-12-21 13:35 ` Sedat Dilek 2010-12-21 18:25 ` Al Viro 2010-12-21 18:57 ` Sedat Dilek 2010-12-22 3:11 ` Nick Piggin 2010-12-22 3:31 ` Sedat Dilek 2010-12-22 4:38 ` Sedat Dilek 2010-12-21 15:12 ` Sedat Dilek 2010-12-21 15:28 ` Sedat Dilek 2010-12-21 17:56 ` Sedat Dilek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox