Received: by 10.192.165.156 with SMTP id m28csp790048imm; Mon, 16 Apr 2018 08:44:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/KXVVnIjaVhdkoP4yQ+o4o0s7SjlfzCEuCyqyr2PYmHSAN1VRwL1Z41aC4+U9PuOfDtcyx X-Received: by 10.99.62.201 with SMTP id l192mr1146701pga.318.1523893499802; Mon, 16 Apr 2018 08:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523893499; cv=none; d=google.com; s=arc-20160816; b=a1zh0u9kZ5zfE+cswq1zlw2SUK1u9g0VhKEtjR1MEpmCE7CO1g9oqrYSy67Ytrj1ST WKZwierRavEHKWmVmbbDcuAl1W6XCTXSKdIUTVvncSWkpQlQEanZBHfalgXqXTkezOmP TaVtKypwo1Fc+J4VlDh82L+gzG5WsOoZOosQeJkIPz4CV3oAtHnULMxmiehFQd+O+trp ylT3lrcFRLlcU6Exi4aZjmnMFataFxTeQEHtykropnXJ/wh4+Y9cS6ke9yPruPB+QKSL v3GflMsHbCC3BMzbPX7+SBBoecZw4aQoxEID/lqwSVoUkq0TizkvaqKI2Lt8xhPJFN00 tTaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=QsjbbolNqizkCSTN0+EQ8OQUIetvZHgsgP4i2IrhODQ=; b=SMtq/nNH6xcnFtgNYg6WbX+guNVpQuugr7EtG3SlVUTT2h6RaI/JLqCTSrMFw945LL aQGpX2Ax48nagLwxSe+Tm0wl0HV+u/DToiyC7UYS3SXVrZwn0x7RShYIZV1PG3E/qMnl A2h7zU8JbPnFnwOgjPc58QiJQZafechAVOvEVlYAtmtdyMOQwZsbXsGslPhwk+52r+7L +8LNF+VXbG3TS583IPedic5Q6M/hbhhw359CGcBBZeLUrgmx6wswgnpaPZoI66xcDe22 GHE63fHb3lt/97KncGjgKauroPfz972ZW1m9O+u77gJqKlWLHwH+apeLYUjj1iIIeI7D yYmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CvgK0xr1; 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 b80si321376pfc.217.2018.04.16.08.44.44; Mon, 16 Apr 2018 08:44: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=CvgK0xr1; 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 S1751218AbeDPPnf (ORCPT + 99 others); Mon, 16 Apr 2018 11:43:35 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:42275 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbeDPPne (ORCPT ); Mon, 16 Apr 2018 11:43:34 -0400 Received: by mail-pl0-f67.google.com with SMTP id t20-v6so10250284ply.9; Mon, 16 Apr 2018 08:43:33 -0700 (PDT) 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=QsjbbolNqizkCSTN0+EQ8OQUIetvZHgsgP4i2IrhODQ=; b=CvgK0xr1YaWUd1CMGefpoHVbYiMaKfLSxTUIsMEi6rbk0RunhebrhyIBMDunFvzr9N XphIKLhnU2QiC7zs86IcGxA/TON6AxFc3WOPHL0rymR4fgfE/XGMNCgSz94d4SggK/qZ JQ2pnBgNedjse+BWZt9GEPQipKcqsi+yLxtjxiCkDTtkFkevzTHZvsK+eunpAQtYtGhS tVW2/T85Y3ulM8RCkpBIhry7YholcHNaoMX1Fsrr7lgld2YLh3f5zp+ivEE+hxOBwsHr tgvmgSqdSJTdhQZN1mfug+QsUjA2oZIqyxuw37sCcj+ydQkm/BbXbJ4txp077LdK+Pyx qtXw== 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=QsjbbolNqizkCSTN0+EQ8OQUIetvZHgsgP4i2IrhODQ=; b=Eg2tb8wbGiYI1oKAlesZZ55amDpTjsNeMrjnAAUU3BKsy7mzvTThuQBiGAxMsHIHEg eOD1CCY47Wt2dbGjcqYB/DCp2bzmy2xXbg7rCmuD1vYkcRMw5xrevllenXsz2eQaWfi4 KByw/khNPrpx+E85CR+FwGRlIpAgcJVedrsvjIFTidcgJbaglUzz9ymZCbLp66gGXIwY WRvil4czNABR1FwI2zkrz+OQLrxviDC41D8iYtNUET8eoPL1/5l4QFQaRAFl0BvTK205 Dl4ukfkYuoESZN9NeXFAQRP0PdQL8ToextkoWL4irj3uwRlrZ6PpWyTwQD3P7rnE7PrG 4Z7A== X-Gm-Message-State: ALQs6tBtwDV00feDWHnpRIhXpogq2SXqXyvJtkAaL0qfHcW6KtnZqOPb 0q8H/XYQNts+2SAxD0fP5UyuueRw X-Received: by 2002:a17:902:70c6:: with SMTP id l6-v6mr15875931plt.201.1523893413326; Mon, 16 Apr 2018 08:43:33 -0700 (PDT) Received: from ?IPv6:2620:15c:2c1:103:dcd8:b5d5:bf84:baad? ([2620:15c:2c1:103:dcd8:b5d5:bf84:baad]) by smtp.gmail.com with ESMTPSA id 81sm23470597pfl.92.2018.04.16.08.43.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 08:43:32 -0700 (PDT) Subject: Re: [PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust To: Yafang Shao , davem@davemloft.net Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, songliubraving@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1523892818-12820-1-git-send-email-laoar.shao@gmail.com> From: Eric Dumazet Message-ID: Date: Mon, 16 Apr 2018 08:43:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1523892818-12820-1-git-send-email-laoar.shao@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/16/2018 08:33 AM, Yafang Shao wrote: > tcp_rcv_space_adjust is called every time data is copied to user space, > introducing a tcp tracepoint for which could show us when the packet is > copied to user. > This could help us figure out whether there's latency in user process. > > When a tcp packet arrives, tcp_rcv_established() will be called and with > the existed tracepoint tcp_probe we could get the time when this packet > arrives. > Then this packet will be copied to user, and tcp_rcv_space_adjust will > be called and with this new introduced tracepoint we could get the time > when this packet is copied to user. > > arrives time : user process time => latency caused by user > tcp_probe tcp_rcv_space_adjust > > Hence in the prink message, sk is printed as a key to connect these two > tracepoints. > socket pointer is not a key. TCP sockets can be reused pretty fast after free. I suggest you go for cookie instead, this is an unique 64bit identifier. ( sock_gen_cookie() for details )