Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1459094
| From | "Serge E. Hallyn" <serge@hallyn.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] kernfs: make kernfs_path*() behave in the style of strlcpy() |
| Date | 2016-08-09 22:20 +0200 |
| Message-ID | <s4lFg-3PL-3@gated-at.bofh.it> (permalink) |
| References | <s47LX-3fR-3@gated-at.bofh.it> <s47LX-3fR-1@gated-at.bofh.it> <s4hii-YE-19@gated-at.bofh.it> <s4llZ-3tX-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Quoting Tejun Heo (tj@kernel.org):
> Hello, Serge.
>
> On Tue, Aug 09, 2016 at 10:33:05AM -0500, Serge E. Hallyn wrote:
> > > + for (i = depth_to - 1; i >= 0; i--) {
> > > + for (kn = kn_to, j = 0; j < i; j++)
> > > + kn = kn->parent;
> >
> > This is O(n^2) where n is the path depth. It's not a hot path, though, do
> > we care?
>
> I don't think it matters. It's a slow path and cgroup hierarchies
> aren't supposed to be super deep to begin with. If it ever does, we
> can replace the cgroup->ancestor_ids[] array with ancestor pointer
> array and walk that instead.
>
> Thanks.
Ok, thanks
Acked-by: Serge Hallyn <serge@hallyn.com>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/4] kernfs: make kernfs_path*() behave in the style of strlcpy() Tejun Heo <tj@kernel.org> - 2016-08-09 07:30 +0200
Re: [PATCH 2/4] kernfs: make kernfs_path*() behave in the style of strlcpy() "Serge E. Hallyn" <serge@hallyn.com> - 2016-08-09 17:40 +0200
Re: [PATCH 2/4] kernfs: make kernfs_path*() behave in the style of strlcpy() Tejun Heo <tj@kernel.org> - 2016-08-09 22:00 +0200
Re: [PATCH 2/4] kernfs: make kernfs_path*() behave in the style of strlcpy() "Serge E. Hallyn" <serge@hallyn.com> - 2016-08-09 22:20 +0200
csiph-web