public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung.kim@lge.com>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH v1 2/2] perf tools: add attr->mmap2 support
Date: Wed, 14 Aug 2013 09:43:59 -0700	[thread overview]
Message-ID: <20130814164359.GM23412@tassilo.jf.intel.com> (raw)
In-Reply-To: <CABPqkBTJKhFPNgeWcffsYr6pnHKM7OEg-et-rc-SY1J0x_Y9gQ@mail.gmail.com>

On Wed, Aug 14, 2013 at 12:30:08PM +0200, Stephane Eranian wrote:
> On Wed, Aug 14, 2013 at 1:34 AM, Andi Kleen <ak@linux.intel.com> wrote:
> > On Tue, Aug 13, 2013 at 01:55:57PM +0200, Stephane Eranian wrote:
> >> This patch adds support for the new PERF_RECORD_MMAP2
> >> record type exposed by the kernel. This is an extended
> >> PERF_RECORD_MMAP record. It adds for each file-backed
> >> mapping the device major, minor number and the inode
> >> number. This triplet uniquely identifies the source
> >> of a file-backed mapping. It can be used to detect
> >> identical virtual mappings between processes for instance.
> >
> > Can you also add the generation number please?
> > That would make it even more unique.
> >
> I assume you're talkng about inode->i_generation, right?

Yes.

> I could add that one easily. I am surprised to see:
> 
> mm/shmem.c:
> static struct inode *shmem_get_inode(struct super_block *sb, const
> struct inode *dir,
>                                      umode_t mode, dev_t dev, unsigned
> long flags)
> {
>                 inode->i_generation = get_seconds();
> }
> I am assuming that the uniqueness for SHM is coming from the SHMID and therefore
> a poor quality i_generation is sufficient here.

Yes that's odd. But most file system should have a sensible generation
number.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

      reply	other threads:[~2013-08-14 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 11:55 [PATCH v1 0/2] perf: add new PERF_RECORD_MMAP2 record type Stephane Eranian
2013-08-13 11:55 ` [PATCH v1 1/2] perf: add attr->mmap2 attribute to an event Stephane Eranian
2013-08-15 10:26   ` Peter Zijlstra
2013-08-19  9:14     ` Stephane Eranian
2013-08-21  9:56       ` Stephane Eranian
2013-08-21  9:55     ` Stephane Eranian
2013-08-13 11:55 ` [PATCH v1 2/2] perf tools: add attr->mmap2 support Stephane Eranian
2013-08-13 23:34   ` Andi Kleen
2013-08-14 10:30     ` Stephane Eranian
2013-08-14 16:43       ` Andi Kleen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130814164359.GM23412@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung.kim@lge.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox