Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1313324ybt; Thu, 18 Jun 2020 05:57:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4DmyWwChuCsKRMB1kpiR2E51zpppWo7ksupN7kYhMuMms7xX0YZST/YWivL7duH3DkaAo X-Received: by 2002:a17:906:b7c8:: with SMTP id fy8mr3704094ejb.85.1592485065168; Thu, 18 Jun 2020 05:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592485065; cv=none; d=google.com; s=arc-20160816; b=zcPmRV1fU2/17f4MCeFWf999cUibysn42INqzefLL6pUdWB44jcwpHs3cpXyXhBZNu 9Dsh3MZjsWdrmdRh06FFBcz66OISzfcZ8KFNhNGTgaUGYfAvteHS+EA75dLfpzSr3drT KQ7oqIMgCbZ4cqtm2U46ebTk6/OiARf5eiyMmLCD8tlyAUXvj85kTKTsYgr22TTlYiQL e+3aQS357WMeoEU0NpuqkskGjrf4/5YWVFWeWRpOwkCFvDS6CvXW2EVgkvL4F8Pk62P5 RzSb9hUmpzhuQzvIE5HjniPCalqqKUsSNgkuJVx6SkgevJoOOPb0NVCmo/v50ulxbSjh 4a5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=v9FbjWBdAd7q99k+gAtkUvgrScXCggI31g4H1SHIHlE=; b=bA68jMmdtb9HoO+V7o6IeztsAxqssEWu3hsf+taocyKUxEfGh2u+8ywYaapevE61Gd XahgTv6fVxNFBqvVZfelEbk/jNE6begrghvgs320IOS4CHxPoHCpId4YzdrJNU9B3Bap BX2yjB03BGAwc6BY8Jhzf0HXJHAbWdrhIiz5/mElXHBVy0/cmsr2JGG7MOE28CHn691L UFTA1C1mtaW2lehcFz2l5mZAZDS+ebgl4hSJRz9yUJ45gZM0xpwz+SaDW4JSrppNJ8ew qJBMRgybH4MIKoAT6cavUkMr8x2yp8N4Q8u8pYjrikh20E4Jad/JBd66YtGhQPIY/Dqm WYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GfvYVDcC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si1907222edw.220.2020.06.18.05.57.22; Thu, 18 Jun 2020 05:57:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GfvYVDcC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729943AbgFRMy6 (ORCPT + 99 others); Thu, 18 Jun 2020 08:54:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:46536 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726909AbgFRMyy (ORCPT ); Thu, 18 Jun 2020 08:54:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592484893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v9FbjWBdAd7q99k+gAtkUvgrScXCggI31g4H1SHIHlE=; b=GfvYVDcCmbLqnv7cHoHE325+ggIBc26DLjM28bMFPOO7ElIsEvHXyn0epURZd3MJqQaFWF 5WzKJfWVKgVHOOrrm08yrfWHYqAAgg/7cf7+zs0Nsvi/AeFsFZbmSwelWVCQ8B7E3iLSs4 Uew6e5XA51Kc6VZktWTlNUC4KnhvoOA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-299-ozpWvtOxPhqpPeYZMlbwrw-1; Thu, 18 Jun 2020 08:54:51 -0400 X-MC-Unique: ozpWvtOxPhqpPeYZMlbwrw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CDE5A835B42; Thu, 18 Jun 2020 12:54:49 +0000 (UTC) Received: from T590 (ovpn-13-98.pek2.redhat.com [10.72.13.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D11585D9E5; Thu, 18 Jun 2020 12:54:42 +0000 (UTC) Date: Thu, 18 Jun 2020 20:54:38 +0800 From: Ming Lei To: Ming Lei Cc: "Naveen N. Rao" , Anil S Keshavamurthy , Linux Kernel Mailing List , "David S. Miller" , Masami Hiramatsu , Steven Rostedt , linux-block Subject: Re: kprobe: __blkdev_put probe is missed Message-ID: <20200618125438.GA191266@T590> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 17, 2020 at 06:30:39PM +0800, Ming Lei wrote: > Hello Guys, > > I found probe on __blkdev_put is missed, which can be observed > via bcc/perf reliably: > > 1) start trace > - perf probe __blkdev_put > - perf trace -a -e probe:__blkdev_put > > or > > /usr/share/bcc/tools/stackcount __blkdev_put > > 2) run the following command: > blockdev --getbsz /dev/sda1 > > 3) 'perf trace' or stackcount just dumps one trace event, and it > should have been two > __blkdev_put() traces, since one __blkdev_put() is called for > partition(/dev/sda1), > and another is for disk(/dev/sda). If trace_printk() is added in __blkdev_put(), > two events will be captured from ftrace. > The issue can be shown by loading a kprobe module which registers on __blkdev_put(), just by replacing _do_fork with __blkdev_put on samples/kprobes/kprobe_example.c. So the issue is really in kprobe code. Thanks, Ming