Re: [PATCH v6 1/4] bpf: add kfunc for populating cpumask bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 7, 2025 at 11:28 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> On Fri, Mar 07, 2025 at 06:28:21AM -1000, Tejun Heo wrote:
> > Hello,
> >
> > On Fri, Mar 07, 2025 at 11:18:46AM -0500, Emil Tsalapatis wrote:
> > > On Fri, Mar 7, 2025 at 10:50 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
> > > >
> > > > On Fri, Mar 07, 2025 at 10:38:44AM -0500, Emil Tsalapatis wrote:
> > > > > Add a helper kfunc that sets the bitmap of a bpf_cpumask from BPF memory.
> > > > >
> > > > > Signed-off-by: Emil Tsalapatis (Meta) <emil@xxxxxxxxxxxxxxx>
> > > > > Acked-by: Hou Tao <houtao1@xxxxxxxxxx>
> > > >
> > > > Would a kfunc to transfer it in the other direction be useful too? If so,
> > > > how would that function be named?
> > > >
> > >
> > > We could add one, but it is not necessary because the BPF program can do the
> > > copy itself by reading the struct cpumask e.g. like this:
> > >
> > > https://github.com/sched-ext/scx/blob/ecdba1f4d9d518bd6a58343cd303187155a39bf3/scheds/rust/scx_wd40/src/bpf/cpumask.bpf.c#L184
> >
> > Ah, right.
> >
> > > If we added a function going bpf_cpumask -> BPF would
> > > bpf_cpumask_into() work as a name?
> >
> > Yeah, was mostly thinking whether the _populate() name would look weird if
> > we need something in the other direction. If we don't, the name is fine:
> >
> >  Acked-by: Tejun Heo <tj@xxxxxxxxxx>
>
> Oops, you dropped the cc list. Can you restore the cc list and quote the
> whole exchange?
>

Ah sorry about that, I fat fingered the reply. Hopefully this properly
restores the thread in lore.kernel.org.

> Thanks.
>
> --
> tejun





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux