1. 29 Apr, 2011 8 commits
  2. 28 Apr, 2011 3 commits
    • Ingo Molnar's avatar
      perf stat: Fix compatibility behavior · ede70290
      Ingo Molnar authored
      Instead of failing on an unknown event, when new perf stat is run on
      older kernels:
      
        $ ./perf stat true
        Error: open_counter returned with 22 (Invalid argument). /bin/dmesg
        may provide additional information.
      
        Fatal: Not all events could be opened.
      
      Just ignore EINVAL and ENOSYS, we'll print the results as not counted:
      
       Performance counter stats for 'true':
      
                0.239483 task-clock               #    0.493 CPUs utilized
                       0 context-switches         #    0.000 M/sec
                       0 CPU-migrations           #    0.000 M/sec
                      86 page-faults              #    0.359 M/sec
                 704,766 cycles                   #    2.943 GHz
           <not counted> stalled-cycles
                 381,961 instructions             #    0.54  insns per cycle
                  69,626 branches                 #  290.735 M/sec
                   4,594 branch-misses            #    6.60% of all branches
      
              0.000485883  seconds time elapsed
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Link: http://lkml.kernel.org/n/tip-7y40wib8n1eqio5hjpn3dsrm@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ede70290
    • Ingo Molnar's avatar
      perf stat: Add --sync/-S option · f9cef0a9
      Ingo Molnar authored
      --sync will tell perf stat to run sync() before starting a command.
      
      This allows IO-heavy tests to be used with --repeat, without one
      iteration impacting the other.
      
      Elapsed time will stabilize for example:
      
        before:        3.971525714  seconds time elapsed  ( +-  8.56% )
        after:         3.211098537  seconds time elapsed  ( +-  1.52% )
      
      So measurements will be more accurate.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Link: http://lkml.kernel.org/n/tip-7y40wib8n1eqio7hjpn1dsrm@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f9cef0a9
    • Ingo Molnar's avatar
      perf event, x86: Use better stalled cycles metric · 8a850cad
      Ingo Molnar authored
      Use the UOPS_EXECUTED.*,c=1,i=1 event on Intel CPUs - it is a rather
      good indicator of CPU execution stalls, more sensitive and more inclusive
      than the 0xa2 resource stalls event (which does not count nearly as many
      stall types).
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Link: http://lkml.kernel.org/n/tip-7y40wib8n1eqio7hjpn2dsrm@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8a850cad
  3. 27 Apr, 2011 1 commit
    • Ingo Molnar's avatar
      perf stat: Fix printout vertical alignment · 9ceb1c3d
      Ingo Molnar authored
      Before:
      
       |
       | Performance counter stats for '/home/mingo/hackbench 20' (5 runs):
       |
       |        71,321,607 instructions:u           #    0.42  insns per cycle  ( +-  0.00% )
       |       168,040,009 cycles:u                 #    0.000 GHz                      ( +-  0.81% )
       |
       |        1.468002368  seconds time elapsed  ( +-  1.33% )
       |
      
      After:
      
       |
       | Performance counter stats for '/home/mingo/hackbench 20' (5 runs):
       |
       |        71,321,607 instructions:u           #    0.42  insns per cycle          ( +-  0.00% )
       |       168,040,009 cycles:u                 #    0.000 GHz                      ( +-  0.81% )
       |
       |        1.468002368  seconds time elapsed  ( +-  1.33% )
       |
      
      The last column (stddev noise) is properly aligned, vertically.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Link: http://lkml.kernel.org/n/tip-7y40wib8n1eqio7hjpn0dsrm@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9ceb1c3d
  4. 26 Apr, 2011 23 commits
  5. 25 Apr, 2011 5 commits
    • Tyler Hicks's avatar
      eCryptfs: Flush dirty pages in setattr · 5be79de2
      Tyler Hicks authored
      After 57db4e8d changed eCryptfs to
      write-back caching, eCryptfs page writeback updates the lower inode
      times due to the use of vfs_write() on the lower file.
      
      To preserve inode metadata changes, such as 'cp -p' does with
      utimensat(), we need to flush all dirty pages early in
      ecryptfs_setattr() so that the user-updated lower inode metadata isn't
      clobbered later in writeback.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=33372Reported-by: default avatarRocko <rockorequin@hotmail.com>
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      5be79de2
    • Tyler Hicks's avatar
      eCryptfs: Handle failed metadata read in lookup · 3aeb86ea
      Tyler Hicks authored
      When failing to read the lower file's crypto metadata during a lookup,
      eCryptfs must continue on without throwing an error. For example, there
      may be a plaintext file in the lower mount point that the user wants to
      delete through the eCryptfs mount.
      
      If an error is encountered while reading the metadata in lookup(), the
      eCryptfs inode's size could be incorrect. We must be sure to reread the
      plaintext inode size from the metadata when performing an open() or
      setattr(). The metadata is already being read in those paths, so this
      adds minimal performance overhead.
      
      This patch introduces a flag which will track whether or not the
      plaintext inode size has been read so that an incorrect i_size can be
      fixed in the open() or setattr() paths.
      
      https://bugs.launchpad.net/bugs/509180
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      3aeb86ea
    • Tyler Hicks's avatar
      eCryptfs: Add reference counting to lower files · 332ab16f
      Tyler Hicks authored
      For any given lower inode, eCryptfs keeps only one lower file open and
      multiplexes all eCryptfs file operations through that lower file. The
      lower file was considered "persistent" and stayed open from the first
      lookup through the lifetime of the inode.
      
      This patch keeps the notion of a single, per-inode lower file, but adds
      reference counting around the lower file so that it is closed when not
      currently in use. If the reference count is at 0 when an operation (such
      as open, create, etc.) needs to use the lower file, a new lower file is
      opened. Since the file is no longer persistent, all references to the
      term persistent file are changed to lower file.
      
      Locking is added around the sections of code that opens the lower file
      and assign the pointer in the inode info, as well as the code the fputs
      the lower file when all eCryptfs users are done with it.
      
      This patch is needed to fix issues, when mounted on top of the NFSv3
      client, where the lower file is left silly renamed until the eCryptfs
      inode is destroyed.
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      332ab16f
    • Tyler Hicks's avatar
      eCryptfs: dput dentries returned from dget_parent · dd55c898
      Tyler Hicks authored
      Call dput on the dentries previously returned by dget_parent() in
      ecryptfs_rename(). This is needed for supported eCryptfs mounts on top
      of the NFSv3 client.
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      dd55c898
    • Tyler Hicks's avatar
      eCryptfs: Remove extra d_delete in ecryptfs_rmdir · 35ffa948
      Tyler Hicks authored
      vfs_rmdir() already calls d_delete() on the lower dentry. That was being
      duplicated in ecryptfs_rmdir() and caused a NULL pointer dereference
      when NFSv3 was the lower filesystem.
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      35ffa948