Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1567746ybk; Sat, 16 May 2020 15:50:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8qteB525MohyiL184P6CGcCESdo9uKaTPiHmOhglUvXESilv9gP9GjkeW6li2WSsH3J/r X-Received: by 2002:a17:906:1c94:: with SMTP id g20mr8784216ejh.319.1589669448087; Sat, 16 May 2020 15:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589669448; cv=none; d=google.com; s=arc-20160816; b=EDnxzc6uivCQL66AD37S3tAYRoWjsLRRfOM3ebYFD+/xIX81+MixqpwLgWDoh3Fc3y 19xfEMUFK24aOOwYWxp01Wb+7bFxRjLJwsnyIpW45clK6gqUp0A7saA/Cj5WQiK/RTRX q06ymv0MYtzUXWGhtNoh1t9Lq92Bo9TBji9FH/pXFjthirn66rbPCe7hDWXQdYTeERB+ W92XvEHY/fITd6KoV3sU7ILI4Y4qMXBt8oge39bpeHc1FGgsUVcjx8L+NC/NBn8BOURI k6KZOtsJo9cYYKcb26mqSRa6xunhHKe7jEMrUm2amolhQKqcczGjfwAVDQPUvGv+MfY6 jrMQ== 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=NGBJJg8ccdwDotOS0lajgPUzbH0sjT5P5HzXMeDAq6s=; b=eE10gc3e57DmM+d0K+zor5lhPiy/qiwGWIXUjpm37YdhzNQTIPqSZWtEWqWFVyh0oM S2cNY5ByKKVOZVy7mt1bTfcvMozAL9ZiIM9kx9Gp19Mr5A1NtzXEViH9tGKIOyrSm9iO RNPReUf9MrW15glcSM2UuZ2pGyro0PU+j/57qkfo9vDT+N+SpoheSm0Db+NI/WUa+OPj O+OG2F2Fmc4R+KhKZL04ZgacIysSwsaPfzYAFJ29Z4l5j2kc8Wz83xxnSIsKbjzaGrUw Rp2n/i8ny3+XH6gV5jTk3ZQY5NnWC7MBRd7u/yZNNAK8c/UPTrQ5vBGMdFhfx3BGjTwC +pWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kd0qghWC; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w15si3326342edv.188.2020.05.16.15.50.23; Sat, 16 May 2020 15:50:48 -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=@google.com header.s=20161025 header.b=kd0qghWC; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726824AbgEPWp7 (ORCPT + 99 others); Sat, 16 May 2020 18:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726700AbgEPWp6 (ORCPT ); Sat, 16 May 2020 18:45:58 -0400 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B77FBC061A0C for ; Sat, 16 May 2020 15:45:58 -0700 (PDT) Received: by mail-yb1-xb44.google.com with SMTP id s37so3161606ybe.13 for ; Sat, 16 May 2020 15:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NGBJJg8ccdwDotOS0lajgPUzbH0sjT5P5HzXMeDAq6s=; b=kd0qghWCRvLiIcrwqmOceUa+qsoVQBLrtOax5TvLJgwX3fxzydbRjZhIsfo+zfmtY7 cfHsoHFnX1/lUXrEdatIt/7VebDx+uQzJ8MwLzT8nysM1h1I/u21OwnIrARKwqyo/k7W jCXGL6/jabykrmNvaT0ARC4LEiweXH7Ij0bDdKR+wJO0qaIOn94yXBlN6LUWjgthqHia mlaEaKKs0A/SxTckt+0buJYQiyq2yjdrElje8OE1OQIREJTUc0HEUbXQTMbfEFTsK9Ql AjfTSGIqXyLt6zvJhxMlg7J8SMpumGibGRhesdRp+pM8fZ8x09YKJ1FL4aGJcoZs/eO4 NafQ== 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=NGBJJg8ccdwDotOS0lajgPUzbH0sjT5P5HzXMeDAq6s=; b=hcURau5o+9VNYyD5CbNuU9W0Ld2bVRQ8thqki//keHRF1vo/gMqWqHpqIljfbLsf1y CnOduoTSDiwSvTIWeWBabzmFiblK4aKfHtIZrloePyFMFSyqD6gOjZy3NzQ4Xcq1Nwmk ANHiDzJNOhip6BcEyD5RdO8pao9zG1Yk4l6+zz9kGZgO2FIQtGfetxTRSvi9V8dei6KW oqPA2qP9FKb52831MOH/nP2GOLRfF4aniDdt9SH6I5pqSN615XLGqygZ4q8d/tqFSGtf luL7a0r34Nece48YzjwgYA+Wyvfq5vtfR9IR47yBpIjoEnwte7TFV9Bp2BW3tHlyi2a0 iesw== X-Gm-Message-State: AOAM531i5sHusQQVNYnijWpQbFrPPLtw6XrMOp2M0czDwX8NWqi61Tqe VnU0wPBPU21zvn6CfRj9SVE9ZE0/3ObedlZq7ljrQA== X-Received: by 2002:a25:4cc4:: with SMTP id z187mr16200349yba.274.1589669157558; Sat, 16 May 2020 15:45:57 -0700 (PDT) MIME-Version: 1.0 References: <20200516021736.226222-1-shakeelb@google.com> <20200516.134018.1760282800329273820.davem@davemloft.net> In-Reply-To: From: Eric Dumazet Date: Sat, 16 May 2020 15:45:46 -0700 Message-ID: Subject: Re: [PATCH] net/packet: simply allocations in alloc_one_pg_vec_page To: Shakeel Butt Cc: David Miller , Willem de Bruijn , Jakub Kicinski , netdev , LKML 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 Sat, May 16, 2020 at 3:35 PM Shakeel Butt wrote: > > On Sat, May 16, 2020 at 1:40 PM David Miller wrote: > > > > From: Shakeel Butt > > Date: Fri, 15 May 2020 19:17:36 -0700 > > > > > and thus there is no need to have any fallback after vzalloc. > > > > This statement is false. > > > > The virtual mapping allocation or the page table allocations can fail. > > > > A fallback is therefore indeed necessary. > > I am assuming that you at least agree that vzalloc should only be > called for non-zero order allocations. So, my argument is if non-zero > order vzalloc has failed (allocations internal to vzalloc, including > virtual mapping allocation and page table allocations, are order 0 and > use GFP_KERNEL i.e. triggering reclaim and oom-killer) then the next > non-zero order page allocation has very low chance of succeeding. 32bit kernels might have exhausted their vmalloc space, yet they can still allocate order-0 pages.