Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5026859imm; Tue, 9 Oct 2018 08:39:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV62EAQJVCihRCdR8kfyfFeahVxo7sGSn+kQr2XBbiGUodtXM5XgdRwlEqhxV9Zmb9Cyy0HMG X-Received: by 2002:a17:902:8c84:: with SMTP id t4-v6mr29599136plo.188.1539099586842; Tue, 09 Oct 2018 08:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539099586; cv=none; d=google.com; s=arc-20160816; b=VsrPmQ+BNtIYNKnJEAFn05pNFYXHool0cXmIRy0cj1NpzeiJtHx2YCIEHhB4r37Jww lehsxpvr2KKsIV6um0wMTFb7+KIPrvgbmRML2qLFiPW5hdYM3o6+QB9haQqVD6P/WbAG 4WDs7sjQClX+UwrmuZ5D59vTEtLeGjra4k7WJp9OnFqaYbRnjWfIzN0VvxBA6csJDVLN gPygLAztiFPNi78y2N1WYNT97ceUQR1GVF9OFlnyeSoOlCD6IAYJoEBeN/Jez1luiLAJ /VdkHXf8Vp/PJC/XaQN34+oWJ+h9dEGYkpK1VsN3hWFm/2GELOqmul5qWxpib+hmIqKb L1Ug== 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=W3xFCs0HpqnRj6cRHEU+WDjgtDouMGc2T8zb7mAKlgo=; b=YORt9557gN8EqDr7pnFft/OCokXR8FXSD9/8MYDI/7pQQVxhGlPjlJ4d175ulPuPj6 7tlDUmV8XNpwdsdhLby8fPhQwgJSbr6gNgLN+KRhBEBDrOEclTqPix8lY8aRkSiuQ4JV uKujfJvJ+eSB3DzO5kToN4gh6WgjL1Kn2MVcn+xLp5cYxNQHuDtqkquyxDcstDO5N8cK 9d/jyhrsRyYxwK4zbWKt5SuQW9BkNUVMYoUVwPtW7sPiY4kZqFISNuS5MLYHlpb/Zzhc JsYTzfvpPqyugMMxlhE661ZkDr3A7K/RMvma9M6Gm5x2UzIwWCjz+nCuBU7lYJ1tjOWJ 01Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VGKQ59fo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id t141-v6si1902199pgb.64.2018.10.09.08.39.32; Tue, 09 Oct 2018 08:39:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VGKQ59fo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726991AbeJIW4X (ORCPT + 99 others); Tue, 9 Oct 2018 18:56:23 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:38820 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbeJIW4W (ORCPT ); Tue, 9 Oct 2018 18:56:22 -0400 Received: by mail-io1-f65.google.com with SMTP id n5-v6so1505740ioh.5 for ; Tue, 09 Oct 2018 08:38:52 -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=W3xFCs0HpqnRj6cRHEU+WDjgtDouMGc2T8zb7mAKlgo=; b=VGKQ59fo7mVoMwxz3l8ThApvzYx9QpARpbP7BZlsgadoEaeyVb/eJC9pImK4gZmcjF wuBTk0zlQQInL/aVPe+Y+AMbw42MY1aF0oqFZGTCMCoYnNOKvsxm5naFIHBao1awt64B dXLp/fm++yzCcOVZxKOIgC8nTupdiiHkD0fu1xKSOYT5PT/5H0gwBXhatPz0WeQ1W8Ex 7y7q6yU7KaT1o1NTVLNGVL7EXM+iElz7JyhdDJBiNXlnxlhjDBQ/mqNnizVGAQwCBsXo 25+LCyzBOC15J0FMi7I9g9giVSQqkCDtGq+JVoZwszOkCG1wB8Vr2J/HuqMUtUMsz5U9 7iiQ== 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=W3xFCs0HpqnRj6cRHEU+WDjgtDouMGc2T8zb7mAKlgo=; b=hheJ7voEqubzQygVPAB4sVaWaH1AN5lCxYSPQa0Me9iuHm8tU/LZlGlePh+WHyiElO /kTFw1zcKknEuDvfHZ6NcbwCN8xMqVrUHbVrqnIbLkcfvnp4cTkIiBoQtCZSbrVJYoQr EDrHgG9irrQdDWgr8QHV/NLrqTiGnTanPrOUOZ8eAsxxH3nPDy9ZjOAdZDmoOAUXCrEW owqjceq9o4GY4ro70E+WDU39c6pS4eIA8CvgqlTEYDptIYJ7p/KI/dDEn87fS1Tal0SP jJd9ZjPXy+7f5mEGLpiaOqmfBrwIVb7JHcnx7YgZkN6llDHoUccDoKodiJ1AiLRiRGSG R2KA== X-Gm-Message-State: ABuFfoixQDqoLg/uowDWltNe4I1Pd310r4QiPD6Cyg6Et9F6Vi5oq9j6 UGGv9hkecmPoB7+QbYIVkjuc1bkpoevbrJkhB81+hg== X-Received: by 2002:a6b:f10f:: with SMTP id e15-v6mr17831381iog.271.1539099531737; Tue, 09 Oct 2018 08:38:51 -0700 (PDT) MIME-Version: 1.0 References: <1539086718-4119-1-git-send-email-laoar.shao@gmail.com> <1539086718-4119-2-git-send-email-laoar.shao@gmail.com> In-Reply-To: From: Eric Dumazet Date: Tue, 9 Oct 2018 08:38:39 -0700 Message-ID: Subject: Re: [PATCH net-next] tcp: forbid direct reclaim if MSG_DONTWAIT is set in send path To: Yafang Shao Cc: David Miller , 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 Tue, Oct 9, 2018 at 7:58 AM Eric Dumazet wrote: > > We do not add bloat in the kernel if no application is ever going to > use it, especially in the TCP fast path. > BTW, are you willing to change all memory allocations in the kernel as well ? Let say an application is using a system call providing a pathname (open(), stat(), ...), how this system call is going to ask the kernel for no direct reclaim ? Even allocating a socket with socket() or accept() has no ability to avoid direct reclaim. So tcp_sendmsg() is only the tip of the iceberg.