From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA622C32771 for ; Wed, 15 Jan 2020 19:43:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7996E222C3 for ; Wed, 15 Jan 2020 19:43:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pf0ybzNn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbgAOTn7 (ORCPT ); Wed, 15 Jan 2020 14:43:59 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46928 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgAOTn7 (ORCPT ); Wed, 15 Jan 2020 14:43:59 -0500 Received: by mail-lj1-f195.google.com with SMTP id m26so19854782ljc.13; Wed, 15 Jan 2020 11:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MDrV7iuXP/9imjsFFQQBvKDPO1bSSfiQthzUbX7LSkM=; b=Pf0ybzNn1vk3Trnb8jy6hr5/9avVY698ixEZRty81up4A/cxSEwCjhZ2qLY8f03XsV EmqZkIHNGQOFbapBtVQ5ZuytnlPUpw9wN4U5ZEvniqKq6NBp52FaiOLDDKZ7QhtkAM7b EcXAjEeqmsNR9V11sH2mAEVaHlV3rnFteV5icAvTntfNnoBTGFB7OZF/b7+VSwjz2CO/ jq6lefn2FCO53SC7qqMN1rgFrJyiw5oUIGgEeztYbQGhxVsTZ5hIIfuLWgxK2lwiIJlb tuZFolqgF11SGn8W9/k88DN7jW3Ioivn7+PHftW0ekhWUMkSweULEh+kjrlYWXFMOshx HUIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MDrV7iuXP/9imjsFFQQBvKDPO1bSSfiQthzUbX7LSkM=; b=k4qZz0v24KoKnmjr88oZDkmvLF/Qi0t5ZaKZWJbSn8tVhyb+X+wsewIl7pe1JcGlEH 7HZAhBKvpUBn4exLORzSrIePl6EvRCfUg5JKKujMB3KxKtnmx6ZZpopr9Fa3YhnAmOec E7TdT6x6LlcF7EyfDqiKPlzrLcGgfgs4U7cMQUfS+tImGdkQaOjvc7eXmcKL8pxYUVla RcwnEuIpcg66LfXHtg5afyIYg6BUOQ1LsWV6L86DMVZHioxgQVUreomiNeNFtjASL97V 2gFNUHS4/cZmk5Y4AUNKpyemWfUH4Sb97McYbRd2LBB1m0aKvmgM/tsVrouQwBawLD7i lHRg== X-Gm-Message-State: APjAAAXP7VPWlWpqBBuWsscV7YmAn3cc9nfT02FbjfwFWfrzGXjdFIKU ECx2CMRf/uY2E441V49BGNPQ5JohRG93YhBvHxg= X-Google-Smtp-Source: APXvYqzkWH9ruR4aPiD1iZa/OZ1CyXN7SKhLPTl98zjv68qZ958u+KP2D7PvFm28gYar5Gw28qovZQ+UOoLEVVkj/oI= X-Received: by 2002:a2e:89d0:: with SMTP id c16mr30274ljk.228.1579117436601; Wed, 15 Jan 2020 11:43:56 -0800 (PST) MIME-Version: 1.0 References: <1578995365-7050-1-git-send-email-magnus.karlsson@intel.com> In-Reply-To: From: Alexei Starovoitov Date: Wed, 15 Jan 2020 11:43:45 -0800 Message-ID: Subject: Re: [PATCH bpf-next] xsk: support allocations of large umems To: Jonathan Lemon Cc: Magnus Karlsson , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Alexei Starovoitov , Daniel Borkmann , Network Development , rgoodfel@isi.edu, bpf Content-Type: text/plain; charset="UTF-8" Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, Jan 15, 2020 at 11:10 AM Jonathan Lemon wrote: > > > > On 14 Jan 2020, at 1:49, Magnus Karlsson wrote: > > > When registering a umem area that is sufficiently large (>1G on an > > x86), kmalloc cannot be used to allocate one of the internal data > > structures, as the size requested gets too large. Use kvmalloc instead > > that falls back on vmalloc if the allocation is too large for kmalloc. > > > > Also add accounting for this structure as it is triggered by a user > > space action (the XDP_UMEM_REG setsockopt) and it is by far the > > largest structure of kernel allocated memory in xsk. > > > > Signed-off-by: Magnus Karlsson > > Reported-by: Ryan Goodfellow > > Acked-by: Jonathan Lemon Applied. Thanks