Received: by 10.192.165.156 with SMTP id m28csp812338imm; Mon, 16 Apr 2018 09:05:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bis1P+MmEPWZzcnU/x7BVIgSpUIWJdllKNFgXN5PWLKnSMxiX6OSCknP2aOknipEeM4lC X-Received: by 10.101.93.140 with SMTP id f12mr13709132pgt.412.1523894751102; Mon, 16 Apr 2018 09:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523894751; cv=none; d=google.com; s=arc-20160816; b=bs6KHBVmQc1dcB1vFGlR3GYJf0dXA2OFOuHdj8oonKB6nap22La72UDnvF6WUJsoDJ KGcw60Yyoo2T1MNG+nG4dTAvQUu1QPK+Ni7f/zWWcKvj2ao+IlcanomUXfM4TwA6gVwe izSTetucAkGFosZYvRnAuhEgnpJNVacqO0aLtTIt4MXxZ6Az6CghJaIDqqdvBC3NUC0l jgBJQRPMjUSy80fXqrQS17FLhHQT96DmORP6+n70iMAVAbrGZZ+1B0/B+cPxAwcEyqat 6ST7cfv7fSTcTalB6J9g2SFuvER51xT2QYJrRePgKMnmbwrcaTuTSatUP/4oHDdnPzKn 56ig== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=w+ri5tMiPk0GfmBvF7LguZ0XiOQiNxAs/KMQUwXlXA0=; b=SQIw4edbMR9Ai1TUYwPzghRpjqCVI20qSc/hhCv/715FZEZ0cqy6uGZf+oYIHPUyIT X9xXEKDw7LpCiDMIb0R8vLN5t39kBKeZvbCHhiGkIJ6tULiK6UElwW6IDnKmHnt5Fb/Y lwnu5+QdUTHfO6OW7mzvAGTqdjHZDEjzoXwAeFWcQpKB4i77g4E4u0EvB2rM6W7ZeehY FZSV04VnjC3BTYJ+wv/Zu8TAr58IQb1lv9iEtfDuDuKdPSa17g0XcVcXnNydVidI2cQI hDzjYLl4TOqiLL56Vodz7aiE6fMUra29GaQMY+MRAu4BFDPVfMoRYH2IbffWkb1eBRdq I7ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g8h+MddU; 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 d79si3812828pfk.71.2018.04.16.09.05.36; Mon, 16 Apr 2018 09:05:51 -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=g8h+MddU; 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 S1752511AbeDPQEQ (ORCPT + 99 others); Mon, 16 Apr 2018 12:04:16 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:35627 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbeDPQEN (ORCPT ); Mon, 16 Apr 2018 12:04:13 -0400 Received: by mail-io0-f193.google.com with SMTP id k8so7880594ioc.2; Mon, 16 Apr 2018 09:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=w+ri5tMiPk0GfmBvF7LguZ0XiOQiNxAs/KMQUwXlXA0=; b=g8h+MddUb/Mq1ni/A0Leu85OblPHQteD0mhtkheG0Xc1vdwKk6LPQweEk5MMna+Ibr TCeU070OBWugFBzZmLXazc3AcaVutRJuasJ51y4KxN98h6pdgWj5O9mS2aNOR98TYdu5 emH37Vd0SZ5By4pC79wkUv8DG1kEejSoeKRdaQbbWKr09dIBy+HsgSM74kQvjZNVDv8+ ZUcNlLKeF4CfHlf3QqvyAQy/nOoQY5PnaE9hhmwzZTBLMVcMFJASYWbg1JLipPRdhlT3 kVuRSNluEKL1zrSJ4E9Ke8lfBZSihUR/Xc9ce4EboXL3heC7S4gdmoie8527PJPF3VdN TORA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=w+ri5tMiPk0GfmBvF7LguZ0XiOQiNxAs/KMQUwXlXA0=; b=rzxqL3qZYe5b1KdgK+nffxH1XGGvheKNQnMifazh776GjQ1RkdIFhuJAhuD8GQEMGk WvRQ13fvaKgRbkoUkDGP2L+ei9/WkK1hwS5awOEUKuVZ51adUVlaSjic8GzxFgJnTkZT J1E73I4HLi5yqSz6y7XWy7rkF0rdQD9BQPcmh/ge95wcAAA+saANDxv+QS/aHK4k2yIw N/U8Ndmg6RxNDG+Y4BF6eeiNR330D1IuIauSJFSzFiWFnJz6RsIIbZuuII6gguQaI6NG EGX247Hqv0l0fxzSCKYkywOAMWqaXoj7tM1sCI7Kwcr/Qve5qo+Dwn3DzWRkQ9Ilsi51 zJYg== X-Gm-Message-State: ALQs6tBWDsvO+VaweEol9/ITaQbOUaRawWnoGztXps4lQwjPWYYWn8gQ EzQ5Y6CY549ysqp53xFpyyl5SaZ0o4oF2p0+Wns= X-Received: by 10.107.82.3 with SMTP id g3mr1428559iob.11.1523894653027; Mon, 16 Apr 2018 09:04:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.10 with HTTP; Mon, 16 Apr 2018 09:03:32 -0700 (PDT) In-Reply-To: References: <1523892818-12820-1-git-send-email-laoar.shao@gmail.com> From: Yafang Shao Date: Tue, 17 Apr 2018 00:03:32 +0800 Message-ID: Subject: Re: [PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust To: Eric Dumazet Cc: David Miller , Alexey Kuznetsov , yoshfuji@linux-ipv6.org, Song Liu , netdev@vger.kernel.org, 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 Mon, Apr 16, 2018 at 11:43 PM, Eric Dumazet wrote: > > > 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 ) > > Thanks for your explanation. Will have a try. Thanks Yafang