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=-4.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 C00CCC43381 for ; Wed, 13 Feb 2019 21:57:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A50E21872 for ; Wed, 13 Feb 2019 21:57:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="oYdIG4sn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392296AbfBMV5W (ORCPT ); Wed, 13 Feb 2019 16:57:22 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42642 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbfBMV5V (ORCPT ); Wed, 13 Feb 2019 16:57:21 -0500 Received: by mail-pg1-f194.google.com with SMTP id d72so1796664pga.9 for ; Wed, 13 Feb 2019 13:57:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+6bbSBPV+nfHo86kEoE/1d69xuMkSi58XAjyC0guLCc=; b=oYdIG4sn7igPckENy5hxVlHRtEIV2uIEkh2j1xGd10hBKhxGNshsU2kFUQ8yWc15ZK mFkWm9mCc4NT7CXq6nDeTAbw32SohEU7rtRxF4Y3bIE4Ow9p1cZJuDtQJWtIIZWe3SG3 J79raeCw3xgKuQvcf+xzordh8FYUPSi8nilhLaHD8mwlrvM/hTQ6cphnItst3g745b5m 2Hp9ZJmIx6mkbp2mRKmvU+gMuMoJf1Lz3sum8A+FDOmRzi5lG7Sf+JAp8sKbyy3dMp7n 4p4fOKe4lpa7aN4ZmaZr89fk/hC7TrqtK0qa1/9V1iTa9Cqwhj0eTG5nDhRi0nIRO45+ r56A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+6bbSBPV+nfHo86kEoE/1d69xuMkSi58XAjyC0guLCc=; b=H5GoFFYiGP67e4SAE+dgVf36Ka0LxIwkaLJtWJNitl/Ltz1VQ9QXMp7cgGyMZ0SCbA EomZZeVcmOwn0KQ3ZSLedeKF1H6+vH8E6RY0TK39UVO31F3k400KR4G9LYM2H42aPM6Z ARcMT7WgeMWsP8lHqEmEv4Z4J0XftBYNLkPDRwpuBsXyN321YTDQIvsAzDoN55gAkiIk QtwQp/sCUOm3Onv9+E0UHLQ6tza5E1sirit3NCvo2GPKgIt6wv6bKbekXjJbUTxqZe2F Ea/VOIH/tIjaLUEFXVm6zqWLAmOMXJuR+mqk8CNMJL9MarCxpKzbZgz2/rb0OwuharM6 YDlw== X-Gm-Message-State: AHQUAuYki11SAe+P7XjGe6WAcX93dHy6BiGKWs0dMy6NhJb8+tsYKfxM uN3qmSdY8Yj0Z6++4mjqBW86hQ== X-Google-Smtp-Source: AHgI3IasdVIPAC9+CbjdC5R7K+JuZ3BJOMNnvFezQsEv+B9DpS1PQgJiP+7a7Hfjddo5G3u1HUqifA== X-Received: by 2002:a63:9402:: with SMTP id m2mr318187pge.93.1550095041082; Wed, 13 Feb 2019 13:57:21 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a12sm333273pgt.58.2019.02.13.13.57.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 13:57:21 -0800 (PST) Date: Wed, 13 Feb 2019 13:57:18 -0800 From: Stephen Hemminger To: Eric Dumazet Cc: David Ahern , netdev , Eric Dumazet , Hangbin Liu , Phil Sutter Subject: Re: [PATCH iproute2] lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg() Message-ID: <20190213135718.1ed23c3a@shemminger-XPS-13-9360> In-Reply-To: <20190213015841.140383-1-edumazet@google.com> References: <20190213015841.140383-1-edumazet@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 12 Feb 2019 17:58:41 -0800 Eric Dumazet wrote: > In the past, we tried to increase the buffer size up to 32 KB in order > to reduce number of syscalls per dump. > > Commit 2d34851cd341 ("lib/libnetlink: re malloc buff if size is not enough") > brought the size back to 4KB because the kernel can not know the application > is ready to receive bigger requests. > > See kernel commits 9063e21fb026 ("netlink: autosize skb lengthes") and > d35c99ff77ec ("netlink: do not enter direct reclaim from netlink_dump()") > for more details. > > Fixes: 2d34851cd341 ("lib/libnetlink: re malloc buff if size is not enough") > Signed-off-by: Eric Dumazet > Cc: Hangbin Liu > Cc: Phil Sutter Applied, although maybe we should bump it to 64K or bigger?