All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Martynas Pumputis <m@lambda.lt>
Cc: netdev@vger.kernel.org, ys114321@gmail.com, ast@kernel.org,
	daniel@iogearbox.net, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH v2 bpf-next] bpf: add optional memory accounting for maps
Date: Thu, 31 Jan 2019 12:04:07 -0800	[thread overview]
Message-ID: <20190131120407.3ebaee11@cakuba.hsd1.ca.comcast.net> (raw)
In-Reply-To: <20190131093801.32220-1-m@lambda.lt>

On Thu, 31 Jan 2019 10:38:01 +0100, Martynas Pumputis wrote:
> Previously, memory allocated for a map was not accounted. Therefore,
> this memory could not be taken into consideration by the cgroups
> memory controller.
> 
> This patch introduces the "BPF_F_ACCOUNT_MEM" flag which enables
> the memory accounting for a map, and it can be set during
> the map creation ("BPF_MAP_CREATE") in "map_flags".

What should happen for no-prealloc maps?  Would it make some sense to
charge the max map size to the user and not each allocation?  Or
perhaps remember the owner to be able to charge the data path
allocations which don't happen in process context as well?

  parent reply	other threads:[~2019-01-31 20:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  9:38 [PATCH v2 bpf-next] bpf: add optional memory accounting for maps Martynas Pumputis
2019-01-31 18:36 ` Alexei Starovoitov
2019-01-31 20:04 ` Jakub Kicinski [this message]
2019-02-01 13:40   ` Martynas

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=20190131120407.3ebaee11@cakuba.hsd1.ca.comcast.net \
    --to=jakub.kicinski@netronome.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=m@lambda.lt \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \
    --cc=ys114321@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.