Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v6 bpf-next 03/11] bpf: Introduce bpf timers.
Date: Wed, 14 Jul 2021 17:43:49 -0700	[thread overview]
Message-ID: <CAADnVQJyP0D2iFgvcCurMPF0_hQjAzqeL1wdpe8u6-ah0Oz=eA@mail.gmail.com> (raw)
In-Reply-To: <CAEf4BzbJb3q0=LwHs_JXXB2a7wsY=rCF7E+nxsM2SgcC6KK8jA@mail.gmail.com>

On Wed, Jul 14, 2021 at 5:00 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
> > +       }
> > +       /* allocate hrtimer via map_kmalloc to use memcg accounting */
> > +       t = bpf_map_kmalloc_node(map, sizeof(*t), GFP_ATOMIC, NUMA_NO_NODE);
>
> I wonder if it would make sense to use map->numa_node here to keep map
> value and timer data in the same NUMA node?
>
> > +       if (!t) {
> > +               ret = -ENOMEM;
> > +               goto out;
> > +       }
>
> [...]
>
> > +
> > +/* This function is called by map_delete/update_elem for individual element.
> > + * By ops->map_release_uref when the user space reference to a map reaches zero
> > + * and by ops->map_free when the kernel reference reaches zero.
>
> is ops->map_free part still valid?

Both good points. Will respin.

  reply	other threads:[~2021-07-15  0:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  1:05 [PATCH v6 bpf-next 00/11] bpf: Introduce BPF timers Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 01/11] bpf: Prepare bpf_prog_put() to be called from irq context Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 02/11] bpf: Factor out bpf_spin_lock into helpers Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 03/11] bpf: Introduce bpf timers Alexei Starovoitov
2021-07-14 23:59   ` Andrii Nakryiko
2021-07-15  0:43     ` Alexei Starovoitov [this message]
2021-07-14  1:05 ` [PATCH v6 bpf-next 04/11] bpf: Add map side support for " Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 05/11] bpf: Prevent pointer mismatch in bpf_timer_init Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 06/11] bpf: Remember BTF of inner maps Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 07/11] bpf: Relax verifier recursion check Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 08/11] bpf: Implement verifier support for validation of async callbacks Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 09/11] bpf: Teach stack depth check about " Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 10/11] selftests/bpf: Add bpf_timer test Alexei Starovoitov
2021-07-14  1:05 ` [PATCH v6 bpf-next 11/11] selftests/bpf: Add a test with bpf_timer in inner map Alexei Starovoitov
2021-07-14 23:59 ` [PATCH v6 bpf-next 00/11] bpf: Introduce BPF timers Andrii Nakryiko

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='CAADnVQJyP0D2iFgvcCurMPF0_hQjAzqeL1wdpe8u6-ah0Oz=eA@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH v6 bpf-next 03/11] bpf: Introduce bpf timers.' \
    /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

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).