Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp103812ybg; Mon, 27 Jul 2020 17:02:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxB8NFtiuv6TkpBXdQDxyLDf8T1jVpIoE2KBtm2XRSWgoWFwYw+5+YgFxvNLY/JhfvA9k1Q X-Received: by 2002:a17:906:6b87:: with SMTP id l7mr3663084ejr.198.1595894530853; Mon, 27 Jul 2020 17:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595894530; cv=none; d=google.com; s=arc-20160816; b=0WZi7qiQ6IqTbeARXdJzqFER/aYbnYPdXDqF4LDD6Zj04FU6HLAmmxea6io62uA+lW xd8M0vJyN8ZS5Y98WXKtF12oAjERZi0HcVkA7G/PnA1Zx5jMXrEi/4eYnNCpzhObIkLC f5709lTwP+KwQEdlUAtwo+uStGzVBtGZfDzP7ABsNv1lCmGG8rknPV/RKjy7n5L6AUSO AFJ9G9mGLbG7EwtnJjITTqjb4TX97oaniHOo2oX9SitnpIZHCCqeFJBL6Gwxufi+6qK5 eLS0G90wanVF33a/nCnglaYyIO9U/XBhsCMDYbEXjLpCD3ZLsq8ZUxZUb23SztQ+CBRc pPcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NddO/vr3OiT6n7/VqgxPzM0fVczErtw3uowOhN8DId8=; b=qh9MRRes1wwFPJmEkfvV4EPKBJvR7fOOyHlNBK/uINHjlvvE5FEMMACsbQmMSwW6Kt UobJYVU0TsjrQxdknf/qTUmUSOt9+yG9AQov138FixUy9OnCf1BAw6f5SVup5ZTeHuGt pLLWbcw/5Yhjdk/l3EvqPPO7B4wq+ImlkVLRaID8IxrW3zvhNpfJzmcv4yPsYxabBz8r uAG1J719m4l3upoZ9DsEHZFN8m58leAq7cUF9pPMQEb5RHBqSJsgc/Nr/Kgt6Xks2MeI BfI8mr1PQlOdn7H7XGGcn4SZ1MZVr9Y6HK/DtWQttBxRb+Ag9t/v0gnE/11AYP2krCeS 2jqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fWpdcb4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si6740947edl.506.2020.07.27.17.01.48; Mon, 27 Jul 2020 17:02:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fWpdcb4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgG1ABh (ORCPT + 99 others); Mon, 27 Jul 2020 20:01:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:47216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgG1ABh (ORCPT ); Mon, 27 Jul 2020 20:01:37 -0400 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 90FD020729; Tue, 28 Jul 2020 00:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595894496; bh=5Hcb80XAAu69G78tPEHAD6OQzHkzsXfULdMeDtfyX+g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fWpdcb4tLEV5db3gqa4qSwYnSgBQMzVJ8QXp/ZclV2NxqOOmH5akcKAF38HYJsEut z9DlgSbDc50m/eSgbkgyYyOGbxbnQRiAZVhgyv+5JkkIoeeo3MCc5eQPrmEmTl/TiR UuMENUXM2H756XTtDnZFIGQVgS4t8p1mGnzfOi8c= Received: by mail-lf1-f50.google.com with SMTP id y18so9965347lfh.11; Mon, 27 Jul 2020 17:01:36 -0700 (PDT) X-Gm-Message-State: AOAM530eYnCBWaxMihx1Pgac9qNlQfa1+WJotsq7co6KFQYow89rsNQB jPDX7H2vy9DrvY4h9h1OXr00X+c14AC+OTBnMXo= X-Received: by 2002:a19:ec12:: with SMTP id b18mr12947411lfa.52.1595894494954; Mon, 27 Jul 2020 17:01:34 -0700 (PDT) MIME-Version: 1.0 References: <20200727184506.2279656-1-guro@fb.com> <20200727184506.2279656-13-guro@fb.com> In-Reply-To: <20200727184506.2279656-13-guro@fb.com> From: Song Liu Date: Mon, 27 Jul 2020 17:01:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v2 12/35] bpf: refine memcg-based memory accounting for xskmap maps To: Roman Gushchin Cc: bpf , Networking , Alexei Starovoitov , Daniel Borkmann , Kernel Team , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 27, 2020 at 12:25 PM Roman Gushchin wrote: > > Extend xskmap memory accounting to include the memory taken by > the xsk_map_node structure. > > Signed-off-by: Roman Gushchin Acked-by: Song Liu > --- > net/xdp/xskmap.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c > index 8367adbbe9df..e574b22defe5 100644 > --- a/net/xdp/xskmap.c > +++ b/net/xdp/xskmap.c > @@ -28,7 +28,8 @@ static struct xsk_map_node *xsk_map_node_alloc(struct xsk_map *map, > struct xsk_map_node *node; > int err; > > - node = kzalloc(sizeof(*node), GFP_ATOMIC | __GFP_NOWARN); > + node = kzalloc(sizeof(*node), > + GFP_ATOMIC | __GFP_NOWARN | __GFP_ACCOUNT); > if (!node) > return ERR_PTR(-ENOMEM); > > -- > 2.26.2 >