Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-14 Thread Roman Gushchin
On Tue, Mar 13, 2018 at 02:47:45PM -0700, Alexei Starovoitov wrote: > On 3/13/18 2:37 PM, Roman Gushchin wrote: > > On Tue, Mar 13, 2018 at 02:27:58PM -0700, Alexei Starovoitov wrote: > > > On 3/13/18 1:50 PM, Tejun Heo wrote: > > > > Hello, Matt. > > > > > > > > cc'ing Roman and Alexei. > > > >

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-14 Thread Roman Gushchin
On Tue, Mar 13, 2018 at 03:42:20PM -0700, Alexei Starovoitov wrote: > On 3/13/18 3:13 PM, Tejun Heo wrote: > > Hello, > > > > On Tue, Mar 13, 2018 at 02:47:45PM -0700, Alexei Starovoitov wrote: > > > it has to be zero lookups. If idr lookup is involved, it's cleaner > > > to add idr as new bpf

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-14 Thread Roman Gushchin
On Tue, Mar 13, 2018 at 02:27:58PM -0700, Alexei Starovoitov wrote: > On 3/13/18 1:50 PM, Tejun Heo wrote: > > Hello, Matt. > > > > cc'ing Roman and Alexei. > > > > On Tue, Mar 06, 2018 at 03:46:55PM -0800, Matt Roper wrote: > > > There are cases where other parts of the kernel may wish to store

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-14 Thread Alexei Starovoitov
On 3/13/18 3:13 PM, Tejun Heo wrote: Hello, On Tue, Mar 13, 2018 at 02:47:45PM -0700, Alexei Starovoitov wrote: it has to be zero lookups. If idr lookup is involved, it's cleaner to add idr as new bpf map type and use cgroup ino as an id. Oh, idr (or rather ida) is just to allocate the key,

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-14 Thread Alexei Starovoitov
On 3/13/18 2:37 PM, Roman Gushchin wrote: On Tue, Mar 13, 2018 at 02:27:58PM -0700, Alexei Starovoitov wrote: On 3/13/18 1:50 PM, Tejun Heo wrote: Hello, Matt. cc'ing Roman and Alexei. On Tue, Mar 06, 2018 at 03:46:55PM -0800, Matt Roper wrote: There are cases where other parts of the

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-14 Thread Alexei Starovoitov
On 3/13/18 1:50 PM, Tejun Heo wrote: Hello, Matt. cc'ing Roman and Alexei. On Tue, Mar 06, 2018 at 03:46:55PM -0800, Matt Roper wrote: There are cases where other parts of the kernel may wish to store data associated with individual cgroups without building a full cgroup controller. Let's

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-13 Thread Tejun Heo
Hello, On Tue, Mar 13, 2018 at 02:47:45PM -0700, Alexei Starovoitov wrote: > it has to be zero lookups. If idr lookup is involved, it's cleaner > to add idr as new bpf map type and use cgroup ino as an id. Oh, idr (or rather ida) is just to allocate the key, once the key is there it pretty much

Re: [Intel-gfx] [PATCH v3 1/6] cgroup: Allow registration and lookup of cgroup private data

2018-03-13 Thread Tejun Heo
Hello, Matt. cc'ing Roman and Alexei. On Tue, Mar 06, 2018 at 03:46:55PM -0800, Matt Roper wrote: > There are cases where other parts of the kernel may wish to store data > associated with individual cgroups without building a full cgroup > controller. Let's add interfaces to allow them to