Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3023577pxb; Tue, 12 Jan 2021 04:36:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyc+Plo5+ctQGUDMvmZaI/4Wwbf3K5/kYv593rzrdPu9vI4uyKvquakriTDnDQgfq/sEn1u X-Received: by 2002:a17:906:76d8:: with SMTP id q24mr3030401ejn.306.1610454969333; Tue, 12 Jan 2021 04:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610454969; cv=none; d=google.com; s=arc-20160816; b=uuEYgbWFMZP+g44GF60eEv/A7FbPzEPYbit9NFm1bCly5LdFIinX/K5o1288+vO7c3 V5lh6AtyW4bHHVZtCZ69YkwnNp5ObRY89q/EmZbiQ9iorSqYR7eyh2ocC4GVMpgEhEB8 QJ0dFn2JQruKHl0IuKt2vHtDH0JRz2UX8/ZHwzFebChpoCEGEkc9AnLKzC6g12cVxBe+ pyTaaoQXjHzBDacF+6kt83sB2R/b1UwHFdhrZEx3VQzT+Uk5CWTI7J1D7wb86eFEZi5y 4h1wKI1auWQZwpQ+Huh9DwYYSvEfiMjk5lplcDOiOJVNa5gUG0+nAcmhGlYnlrJPkdjW AxMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=4C7koV7P9bGKc+8BN3L92y65XqnLENV7qQnrXi9vunM=; b=EFtd2KrmlsB/BZ/vqx66wiwVRxllg9FmSl/VfkEbrDb+GDX4xG6Rkitd2Nx3KRy0Te ew3HJWqaRNHk59AWEhTcDdcuYa1Zl7fTa/4EbP8ieZssy43FkhJ7jBYmw4m4sBWone3E +aUgIXQPeSazxlcS962Io6KjPRsp7HKyT8O+9Is6bjJ8EbvPa9PmJbxmn7gVtPknJt8c Zpc2aUHNvoL5XQ7FfemZl6Ck6IKdAC0mJyIZgkg5T9Lt4Zk78EUp0rtnULJFs0ZB3GlU AZ5gRimUPo3lihlTq05jjPMgKNq/2o5DoNu2Qpc4gd3j4DwSzzDLKtHv3sknoJStQ9pb baRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IPMh9X5B; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj22si1164694ejb.215.2021.01.12.04.35.46; Tue, 12 Jan 2021 04:36:09 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=IPMh9X5B; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392879AbhALJyt (ORCPT + 99 others); Tue, 12 Jan 2021 04:54:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730628AbhALJys (ORCPT ); Tue, 12 Jan 2021 04:54:48 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB1ECC061786; Tue, 12 Jan 2021 01:54:07 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id y23so1487306wmi.1; Tue, 12 Jan 2021 01:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4C7koV7P9bGKc+8BN3L92y65XqnLENV7qQnrXi9vunM=; b=IPMh9X5BrV1/JjonSuaCs7E9x+6WGO3aAUl8ReIGobx3T/2p8PMuEQyPwietoLfCcq L7LKDtMh2FziyR+3kuPAOJlo58Lne9hMVRZa64gMAgD5IevPqRxBw9QsNZbHHeIByGcc MD90h7SbWm+29I1ka3vigZpIz6a0OvFhK3C/byqpcjOk6pT8cxuO+aE4Ij4Ue3emWBWi dnABj7jE+tJSp7tOKpOhLauRhfhAxolnyWAvD5GEy6+QIKRvthXvpqGw9m4xuqjaQUon ts8uPeBCgr+zHVw3ROEiP1R1QNNnvLSo+Qa+pOneP3QGRmeAR69K2lPHs06CNRizr3L+ gfxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4C7koV7P9bGKc+8BN3L92y65XqnLENV7qQnrXi9vunM=; b=DRW5CEEHNbCNCWl0wkpQG0BnfHr0um9LWiOCOGhOorE7Td6HXhI+XLyTTBA2nRaNd1 HtIonQf56GZxwVKnq0LcX4vKkGyTs1WmpY8IaQ8yT54LgFcEecl8w1V8+haru/HyY7D+ CknAs1JIzm9Q0cbms2nZOwsImYd2mvTP35nErCgLN54KPDadal1xo9gvG/R8XRXFBeEZ Xxx7Kn5/OtJXt+WqpLg9vomPaJBrdPBluwHNzIOso2buTcxh8o8bGdrvmAlU4VM15FC0 yu2OtYavS90z+KzoGVY4AwyqwkqOvqURjHccZ3UhRZ/V75/R0s/k4jy7zFT1pZBYxv0V 953w== X-Gm-Message-State: AOAM530QdPTXeHHMmijI7ursggQNVYY3xeL8sfhcxUUbNqzuFaG+eZsv QsOgBnh1pq8+Q85HpKBuLks16tXeMiZHkA== X-Received: by 2002:a1c:e342:: with SMTP id a63mr2804716wmh.64.1610445246608; Tue, 12 Jan 2021 01:54:06 -0800 (PST) Received: from [192.168.1.122] (cpc159425-cmbg20-2-0-cust403.5-4.cable.virginm.net. [86.7.189.148]) by smtp.gmail.com with ESMTPSA id s13sm2876036wmj.28.2021.01.12.01.54.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jan 2021 01:54:05 -0800 (PST) Subject: Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing To: Alexander Lobakin , "David S. Miller" , Jakub Kicinski Cc: Eric Dumazet , Edward Cree , Jonathan Lemon , Willem de Bruijn , Miaohe Lin , Steffen Klassert , Guillaume Nault , Yadu Kishore , Al Viro , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210111182655.12159-1-alobakin@pm.me> From: Edward Cree Message-ID: Date: Tue, 12 Jan 2021 09:54:04 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210111182655.12159-1-alobakin@pm.me> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without wishing to weigh in on whether this caching is a good idea... Wouldn't it be simpler, rather than having two separate "alloc" and "flush" caches, to have a single larger cache, such that whenever it becomes full we bulk flush the top half, and when it's empty we bulk alloc the bottom half? That should mean fewer branches, fewer instructions etc. than having to decide which cache to act upon every time. -ed