linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@googlemail.com>
To: Nick Piggin <npiggin@kernel.dk>
Cc: systemd-devel@lists.freedesktop.org,
	linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org,
	eparis@redhat.com
Subject: Re: [patch] cgroup fs: avoid switching ->d_op on live dentry
Date: Tue, 21 Dec 2010 18:56:29 +0100	[thread overview]
Message-ID: <AANLkTimxJ_3y3QoJM3aQHP7xEH4NHmq9tYoTGt1kNMBH@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=52p7CwsChj5BL+smnXzPtYzf1qE5A7h7o0V6X@mail.gmail.com>

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.

  reply	other threads:[~2010-12-21 17:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-21  7:12 Nick Piggin
2010-12-21  9:04 ` Paul Menage

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=AANLkTimxJ_3y3QoJM3aQHP7xEH4NHmq9tYoTGt1kNMBH@mail.gmail.com \
    --to=sedat.dilek@googlemail.com \
    --cc=eparis@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    --cc=sedat.dilek@gmail.com \
    --cc=systemd-devel@lists.freedesktop.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).