Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp299705imm; Tue, 9 Oct 2018 18:32:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV62s3Po2JDqC1vhUqbqsRp6YnsBDwWd79sh5aRH9Fk3JtYDbilo4DBcdqWXr8d8o5VSBy8js X-Received: by 2002:a62:5ac6:: with SMTP id o189-v6mr4320352pfb.40.1539135120021; Tue, 09 Oct 2018 18:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539135119; cv=none; d=google.com; s=arc-20160816; b=ZLwof+0UXyYZc/pKYT7iEGQdRH8nVrha8PZKY7NrPd8h20QdnZUGSOOPYMFLxld9gY qMVrhoK12YJBI4BytiE/tgpORnmoLUK2ZuwjFs9Zc+kNkXx+wLd3OOwxDecwzcZwJAeD 45fOEmpoYPI57mIdRMMruv6y7dRDv9m0amgyb/7PKO2egY3Q7LF184XUNlWRw45CLHCS ggHLsCH4IJqdUPo7w6V14JrYMsULL2/fq/UvudHSo0OJd8Et4OiWIvmYpid/Z90rzAXD C28IigZctPPMu9Ht894UHw1264+6oCkNqcQheOhj4j2TSRuz43HE5ius/uKuX9aIi/+x T2LQ== 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=Xv9P+evkxsAIe39vulMkiewXxkXXy8M2onsk6yXvRFI=; b=QYydrXmYz15TnEm5VtDlZ28WaYcYS848nWyh0gsmga/mnFwIZmuP73fKPO5g+Ynu7r WYK0I+DDfa2kwxo/55xjNdyWeM8oqfwUyYoYKbLXpabcLFQBECeq2zUTeYMjysoP+XS+ cAGrgddRHzTJKMy1a2RfUK1vo5eR+xcHRqNB2jv9N/PGkrEAJ2cz7rx6VLEf4g5QmJt1 TBH1mui9Wo2R01+28zOPohhZ1WCEBMsJjPz/Eb5pXY/io/2j9+EBG1Td/EvltWxTd94e W1DNU6x84hBdnSZrBc7Pwtta0vyLmg7pZywpEUh9JjiW+Ird/ZTUphxPwdPMZQvQChoN hxag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kqoKdGIC; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31-v6si24400977pla.256.2018.10.09.18.31.44; Tue, 09 Oct 2018 18:31:59 -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=@gmail.com header.s=20161025 header.b=kqoKdGIC; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbeJJIvG (ORCPT + 99 others); Wed, 10 Oct 2018 04:51:06 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:34854 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbeJJIvG (ORCPT ); Wed, 10 Oct 2018 04:51:06 -0400 Received: by mail-it1-f194.google.com with SMTP id p64-v6so5747090itp.0; Tue, 09 Oct 2018 18:31:21 -0700 (PDT) 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=Xv9P+evkxsAIe39vulMkiewXxkXXy8M2onsk6yXvRFI=; b=kqoKdGICqVJ2+ewII8YurJNH40Zd0Srs7nG4OHguQYV4kgzWsypz5Dz6/v5RKgWfjo Vdj2hK75sXJVEhKRwT6lr7Ifjm7BKjKITYln+wxj1Dk8qR9T9Y4gqyjMtwoP5rBphgFa UoSaqkGQoOhdyfZDmdvBBqfr61uTPpQLozvMofMpu8At9horhO3vE1BVloIe4wcY9jIQ JhdQgnO8fg6T+hlFrjdXdT+E03hqWaQhuD3TDz1KdiYW+bVbJLsERkZZr/VIsZo/kXK7 paaCjKQha9GyPkJHDHEg5yNcPPkGcTWMKrtg4DcsDN7ZDwf/xYbGONdJ75/r7UEsQe2W 75wA== 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=Xv9P+evkxsAIe39vulMkiewXxkXXy8M2onsk6yXvRFI=; b=fcLP1O3E8qSgGHCoy9oOOHnV+Mmc+eS7o9DMdK+C9eamNo3F9Zl6mew01vPisHTLSn r6/cDZWeF28dJISnYqnUPjkrlKJZogKC0Qg99ZT9gFIiibZKbqKFHns1dzDKA6l86mW8 QrpuWONSOHRsi9IA7xzLgNcKCUwbE3mLAzd98wEh6m+/iGa9MDr0IwuE0LHsFgcWCeLz T1SiIF68IvHj+O6nST6H3RvnHVEC2qm1N7d+kJaF6JsLHlBkWqcROe3lxpZpX2uSVKIf EDHNVD1SBH/pK9EqdPhQ6DDqNKK/1UV/7GzGNAJ40dMOYbVgvKae+6Mb3m0EY3VqIa28 5Qkw== X-Gm-Message-State: ABuFfogRhB31X0uPrl0JMl9z7Uhy+jlS2rr2ih6eQi6uQYwiwYTo+fZT OULijhcCxVj86PeuBMU8UI0FG7wHLiWByTfZUVE= X-Received: by 2002:a24:7b50:: with SMTP id q77-v6mr3315443itc.154.1539135081230; Tue, 09 Oct 2018 18:31:21 -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: Yafang Shao Date: Wed, 10 Oct 2018 09:30:44 +0800 Message-ID: Subject: Re: [PATCH net-next] tcp: forbid direct reclaim if MSG_DONTWAIT is set in send path To: Eric Dumazet 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 11:38 PM Eric Dumazet wrote: > > 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. If we can really find a solution that is good enough to hanlde direct reclaim in tcp_sendmsg, we could also implement it in other syscalls. Unexpected latency is hateful. Thanks Yafang