From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <mawilcox@microsoft.com>,
linux-nvdimm@lists.01.org, Dave Chinner <david@fromorbit.com>,
linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
linux-mm@kvack.org, Ingo Molnar <mingo@redhat.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping()
Date: Thu, 1 Dec 2016 08:44:32 -0700 [thread overview]
Message-ID: <20161201154432.GD5160@linux.intel.com> (raw)
In-Reply-To: <20161201091930.2084d32c@gandalf.local.home>
On Thu, Dec 01, 2016 at 09:19:30AM -0500, Steven Rostedt wrote:
> On Wed, 30 Nov 2016 16:45:33 -0700
> Ross Zwisler <ross.zwisler@linux.intel.com> wrote:
>
> > diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
> > index a3d90b9..033fc7b 100644
> > --- a/include/linux/pfn_t.h
> > +++ b/include/linux/pfn_t.h
> > @@ -15,6 +15,12 @@
> > #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
> > #define PFN_MAP (1ULL << (BITS_PER_LONG_LONG - 4))
> >
> > +#define PFN_FLAGS_TRACE \
> > + { PFN_SG_CHAIN, "SG_CHAIN" }, \
> > + { PFN_SG_LAST, "SG_LAST" }, \
> > + { PFN_DEV, "DEV" }, \
> > + { PFN_MAP, "MAP" }
> > +
> > static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, u64 flags)
> > {
> > pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), };
> > diff --git a/include/trace/events/fs_dax.h b/include/trace/events/fs_dax.h
> > index 9f0a455..7d0ea33 100644
> > --- a/include/trace/events/fs_dax.h
> > +++ b/include/trace/events/fs_dax.h
> > @@ -104,6 +104,57 @@ DEFINE_EVENT(dax_pmd_load_hole_class, name, \
> > DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole);
> > DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole_fallback);
> >
> > +DECLARE_EVENT_CLASS(dax_pmd_insert_mapping_class,
> > + TP_PROTO(struct inode *inode, struct vm_area_struct *vma,
> > + unsigned long address, int write, long length, pfn_t pfn,
> > + void *radix_entry),
> > + TP_ARGS(inode, vma, address, write, length, pfn, radix_entry),
> > + TP_STRUCT__entry(
> > + __field(dev_t, dev)
> > + __field(unsigned long, ino)
> > + __field(unsigned long, vm_flags)
> > + __field(unsigned long, address)
> > + __field(int, write)
>
> Place "write" at the end. The ring buffer is 4 byte aligned, so on
> archs that can access 8 bytes on 4 byte alignment, this will be packed
> tighter. Otherwise, you'll get 4 empty bytes after "write".
Actually I think it may be ideal to stick it as the 2nd entry after 'dev'.
dev_t is:
typedef __u32 __kernel_dev_t;
typedef __kernel_dev_t dev_t;
So those two 32 bit values should combine into a single 64 bit space.
Thanks for the help, I obviously wasn't considering packing when ordering the
elements.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>,
Dan Williams <dan.j.williams@intel.com>,
Dave Chinner <david@fromorbit.com>,
Ingo Molnar <mingo@redhat.com>, Jan Kara <jack@suse.cz>,
Matthew Wilcox <mawilcox@microsoft.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-nvdimm@lists.01.org
Subject: Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping()
Date: Thu, 1 Dec 2016 08:44:32 -0700 [thread overview]
Message-ID: <20161201154432.GD5160@linux.intel.com> (raw)
In-Reply-To: <20161201091930.2084d32c@gandalf.local.home>
On Thu, Dec 01, 2016 at 09:19:30AM -0500, Steven Rostedt wrote:
> On Wed, 30 Nov 2016 16:45:33 -0700
> Ross Zwisler <ross.zwisler@linux.intel.com> wrote:
>
> > diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
> > index a3d90b9..033fc7b 100644
> > --- a/include/linux/pfn_t.h
> > +++ b/include/linux/pfn_t.h
> > @@ -15,6 +15,12 @@
> > #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
> > #define PFN_MAP (1ULL << (BITS_PER_LONG_LONG - 4))
> >
> > +#define PFN_FLAGS_TRACE \
> > + { PFN_SG_CHAIN, "SG_CHAIN" }, \
> > + { PFN_SG_LAST, "SG_LAST" }, \
> > + { PFN_DEV, "DEV" }, \
> > + { PFN_MAP, "MAP" }
> > +
> > static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, u64 flags)
> > {
> > pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), };
> > diff --git a/include/trace/events/fs_dax.h b/include/trace/events/fs_dax.h
> > index 9f0a455..7d0ea33 100644
> > --- a/include/trace/events/fs_dax.h
> > +++ b/include/trace/events/fs_dax.h
> > @@ -104,6 +104,57 @@ DEFINE_EVENT(dax_pmd_load_hole_class, name, \
> > DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole);
> > DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole_fallback);
> >
> > +DECLARE_EVENT_CLASS(dax_pmd_insert_mapping_class,
> > + TP_PROTO(struct inode *inode, struct vm_area_struct *vma,
> > + unsigned long address, int write, long length, pfn_t pfn,
> > + void *radix_entry),
> > + TP_ARGS(inode, vma, address, write, length, pfn, radix_entry),
> > + TP_STRUCT__entry(
> > + __field(dev_t, dev)
> > + __field(unsigned long, ino)
> > + __field(unsigned long, vm_flags)
> > + __field(unsigned long, address)
> > + __field(int, write)
>
> Place "write" at the end. The ring buffer is 4 byte aligned, so on
> archs that can access 8 bytes on 4 byte alignment, this will be packed
> tighter. Otherwise, you'll get 4 empty bytes after "write".
Actually I think it may be ideal to stick it as the 2nd entry after 'dev'.
dev_t is:
typedef __u32 __kernel_dev_t;
typedef __kernel_dev_t dev_t;
So those two 32 bit values should combine into a single 64 bit space.
Thanks for the help, I obviously wasn't considering packing when ordering the
elements.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>,
Dan Williams <dan.j.williams@intel.com>,
Dave Chinner <david@fromorbit.com>,
Ingo Molnar <mingo@redhat.com>, Jan Kara <jack@suse.cz>,
Matthew Wilcox <mawilcox@microsoft.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-nvdimm@ml01.01.org
Subject: Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping()
Date: Thu, 1 Dec 2016 08:44:32 -0700 [thread overview]
Message-ID: <20161201154432.GD5160@linux.intel.com> (raw)
In-Reply-To: <20161201091930.2084d32c@gandalf.local.home>
On Thu, Dec 01, 2016 at 09:19:30AM -0500, Steven Rostedt wrote:
> On Wed, 30 Nov 2016 16:45:33 -0700
> Ross Zwisler <ross.zwisler@linux.intel.com> wrote:
>
> > diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
> > index a3d90b9..033fc7b 100644
> > --- a/include/linux/pfn_t.h
> > +++ b/include/linux/pfn_t.h
> > @@ -15,6 +15,12 @@
> > #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
> > #define PFN_MAP (1ULL << (BITS_PER_LONG_LONG - 4))
> >
> > +#define PFN_FLAGS_TRACE \
> > + { PFN_SG_CHAIN, "SG_CHAIN" }, \
> > + { PFN_SG_LAST, "SG_LAST" }, \
> > + { PFN_DEV, "DEV" }, \
> > + { PFN_MAP, "MAP" }
> > +
> > static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, u64 flags)
> > {
> > pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), };
> > diff --git a/include/trace/events/fs_dax.h b/include/trace/events/fs_dax.h
> > index 9f0a455..7d0ea33 100644
> > --- a/include/trace/events/fs_dax.h
> > +++ b/include/trace/events/fs_dax.h
> > @@ -104,6 +104,57 @@ DEFINE_EVENT(dax_pmd_load_hole_class, name, \
> > DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole);
> > DEFINE_PMD_LOAD_HOLE_EVENT(dax_pmd_load_hole_fallback);
> >
> > +DECLARE_EVENT_CLASS(dax_pmd_insert_mapping_class,
> > + TP_PROTO(struct inode *inode, struct vm_area_struct *vma,
> > + unsigned long address, int write, long length, pfn_t pfn,
> > + void *radix_entry),
> > + TP_ARGS(inode, vma, address, write, length, pfn, radix_entry),
> > + TP_STRUCT__entry(
> > + __field(dev_t, dev)
> > + __field(unsigned long, ino)
> > + __field(unsigned long, vm_flags)
> > + __field(unsigned long, address)
> > + __field(int, write)
>
> Place "write" at the end. The ring buffer is 4 byte aligned, so on
> archs that can access 8 bytes on 4 byte alignment, this will be packed
> tighter. Otherwise, you'll get 4 empty bytes after "write".
Actually I think it may be ideal to stick it as the 2nd entry after 'dev'.
dev_t is:
typedef __u32 __kernel_dev_t;
typedef __kernel_dev_t dev_t;
So those two 32 bit values should combine into a single 64 bit space.
Thanks for the help, I obviously wasn't considering packing when ordering the
elements.
next prev parent reply other threads:[~2016-12-01 15:44 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 23:45 [PATCH v2 0/6] introduce DAX tracepoint support Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` [PATCH v2 1/6] tracing: add __print_flags_u64() Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-12-01 14:12 ` Steven Rostedt
2016-12-01 14:12 ` Steven Rostedt
2016-12-01 14:12 ` Steven Rostedt
2016-12-01 15:35 ` Ross Zwisler
2016-12-01 15:35 ` Ross Zwisler
2016-11-30 23:45 ` [PATCH v2 2/6] dax: remove leading space from labels Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-12-01 8:11 ` Jan Kara
2016-12-01 8:11 ` Jan Kara
2016-12-01 8:11 ` Jan Kara
2016-12-01 15:26 ` Ross Zwisler
2016-12-01 15:26 ` Ross Zwisler
2016-12-01 15:26 ` Ross Zwisler
2016-12-01 16:33 ` Jan Kara
2016-12-01 16:33 ` Jan Kara
2016-12-01 16:33 ` Jan Kara
2016-11-30 23:45 ` [PATCH v2 3/6] dax: add tracepoint infrastructure, PMD tracing Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-12-01 8:10 ` Jan Kara
2016-12-01 8:10 ` Jan Kara
2016-12-01 8:10 ` Jan Kara
2016-12-01 14:16 ` Steven Rostedt
2016-12-01 14:16 ` Steven Rostedt
2016-12-01 14:16 ` Steven Rostedt
2016-12-01 15:39 ` Ross Zwisler
2016-12-01 15:39 ` Ross Zwisler
2016-12-01 15:39 ` Ross Zwisler
2016-11-30 23:45 ` [PATCH v2 4/6] dax: update MAINTAINERS entries for FS DAX Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` [PATCH v2 5/6] dax: add tracepoints to dax_pmd_load_hole() Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping() Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-11-30 23:45 ` Ross Zwisler
2016-12-01 14:19 ` Steven Rostedt
2016-12-01 14:19 ` Steven Rostedt
2016-12-01 14:19 ` Steven Rostedt
2016-12-01 15:44 ` Ross Zwisler [this message]
2016-12-01 15:44 ` Ross Zwisler
2016-12-01 15:44 ` Ross Zwisler
2016-12-01 16:11 ` Steven Rostedt
2016-12-01 16:11 ` Steven Rostedt
2016-12-01 16:11 ` Steven Rostedt
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=20161201154432.GD5160@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=david@fromorbit.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mawilcox@microsoft.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.