Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1534226

Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping()

From Ross Zwisler <ross.zwisler@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping()
Date 2016-12-01 16:50 +0100
Message-ID <sJBMu-5TK-13@gated-at.bofh.it> (permalink)
References <sJmNr-4n7-9@gated-at.bofh.it> <sJmNr-4n7-29@gated-at.bofh.it> <sJAno-4Xx-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] introduce DAX tracepoint support Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 00:50 +0100
  [PATCH v2 5/6] dax: add tracepoints to dax_pmd_load_hole() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 00:50 +0100
  [PATCH v2 2/6] dax: remove leading space from labels Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 00:50 +0100
    Re: [PATCH v2 2/6] dax: remove leading space from labels Jan Kara <jack@suse.cz> - 2016-12-01 09:30 +0100
      Re: [PATCH v2 2/6] dax: remove leading space from labels Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 16:30 +0100
        Re: [PATCH v2 2/6] dax: remove leading space from labels Jan Kara <jack@suse.cz> - 2016-12-01 17:40 +0100
  [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 00:50 +0100
    Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping() Steven Rostedt <rostedt@goodmis.org> - 2016-12-01 15:20 +0100
      Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 16:50 +0100
        Re: [PATCH v2 6/6] dax: add tracepoints to dax_pmd_insert_mapping() Steven Rostedt <rostedt@goodmis.org> - 2016-12-01 17:20 +0100
  [PATCH v2 4/6] dax: update MAINTAINERS entries for FS DAX Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-12-01 00:50 +0100

csiph-web