1. 20 5月, 2009 2 次提交
    • P
      perf_counter: Solve the rotate_ctx vs inherit race differently · d7b629a3
      Peter Zijlstra 提交于
      Instead of disabling RR scheduling of the counters, use a different list
      that does not get rotated to iterate the counters on inheritance.
      
      [ Impact: cleanup, optimization ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090520102553.237504544@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d7b629a3
    • I
      perf_counter: fix counter inheritance race · c44d70a3
      Ingo Molnar 提交于
      Context rotation should not occur when we are in the middle of
      walking the counter list when inheriting counters ...
      
      [ Impact: fix occasionally incorrect perf stat results ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c44d70a3
  2. 16 5月, 2009 1 次提交
    • M
      libata: Media rotation rate and form factor heuristics · 4bca3286
      Martin K. Petersen 提交于
      This patch provides new heuristics for parsing both the form factor and
      media rotation rate ATA IDENFITY words.
      
      The reported ATA version must be 7 or greater and the device must return
      values defined as valid in the standard.  Only then are the
      characteristics reported to SCSI via the VPD B1 page.
      
      This seems like a reasonable compromise to me considering that we have
      been shipping several kernel releases that key off the rotation rate bit
      without any version checking whatsoever.  With no complaints so far.
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      4bca3286
  3. 15 5月, 2009 6 次提交
    • P
      perf_counter: allow arch to supply event misc flags and instruction pointer · 9d23a90a
      Paul Mackerras 提交于
      At present the values we put in overflow events for the misc
      flags indicating processor mode and the instruction pointer are
      obtained using the standard user_mode() and
      instruction_pointer() functions. Those functions tell you where
      the performance monitor interrupt was taken, which might not be
      exactly where the counter overflow occurred, for example
      because interrupts were disabled at the point where the
      overflow occurred, or because the processor had many
      instructions in flight and chose to complete some more
      instructions beyond the one that caused the counter overflow.
      
      Some architectures (e.g. powerpc) can supply more precise
      information about where the counter overflow occurred and the
      processor mode at that point.  This introduces new functions,
      perf_misc_flags() and perf_instruction_pointer(), which arch
      code can override to provide more precise information if
      available.  They have default implementations which are
      identical to the existing code.
      
      This also adds a new misc flag value,
      PERF_EVENT_MISC_HYPERVISOR, for the case where a counter
      overflow occurred in the hypervisor.  We encode the processor
      mode in the 2 bits previously used to indicate user or kernel
      mode; the values for user and kernel mode are unchanged and
      hypervisor mode is indicated by both bits being set.
      
      [ Impact: generalize perfcounter core facilities ]
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <18956.1272.818511.561835@cargo.ozlabs.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9d23a90a
    • P
      perf_counter: frequency based adaptive irq_period · 60db5e09
      Peter Zijlstra 提交于
      Instead of specifying the irq_period for a counter, provide a target interrupt
      frequency and dynamically adapt the irq_period to match this frequency.
      
      [ Impact: new perf-counter attribute/feature ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <20090515132018.646195868@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      60db5e09
    • P
      perf_counter: per user mlock gift · 789f90fc
      Peter Zijlstra 提交于
      Instead of a per-process mlock gift for perf-counters, use a
      per-user gift so that there is less of a DoS potential.
      
      [ Impact: allow less worst-case unprivileged memory consumption ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <20090515132018.496182835@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      789f90fc
    • J
      Revert "mm: add /proc controls for pdflush threads" · cd17cbfd
      Jens Axboe 提交于
      This reverts commit fafd688e.
      
      Work is progressing to switch away from pdflush as the process backing
      for flushing out dirty data. So it seems pointless to add more knobs
      to control pdflush threads. The original author of the patch did not
      have any specific use cases for adding the knobs, so we can easily
      revert this before 2.6.30 to avoid having to maintain this API
      forever.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      cd17cbfd
    • P
      perf_counter: Rework the perf counter disable/enable · 9e35ad38
      Peter Zijlstra 提交于
      The current disable/enable mechanism is:
      
      	token = hw_perf_save_disable();
      	...
      	/* do bits */
      	...
      	hw_perf_restore(token);
      
      This works well, provided that the use nests properly. Except we don't.
      
      x86 NMI/INT throttling has non-nested use of this, breaking things. Therefore
      provide a reference counter disable/enable interface, where the first disable
      disables the hardware, and the last enable enables the hardware again.
      
      [ Impact: refactor, simplify the PMU disable/enable logic ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9e35ad38
    • C
      drm/i915: Add new GET_PIPE_FROM_CRTC_ID ioctl. · 08d7b3d1
      Carl Worth 提交于
      This allows userlevel code to discover the pipe number corresponding
      to a given CRTC ID. This is necessary for doing pipe-specific
      operations such as waiting for vblank on a given CRTC.  Failure to use
      the right pipe mapping can result in GPU hangs, or at least failure
      to actually sync to vblank.
      Signed-off-by: NCarl Worth <cworth@cworth.org>
      [anholt: Style touchups from review]
      Signed-off-by: NEric Anholt <eric@anholt.net>
      08d7b3d1
  4. 13 5月, 2009 2 次提交
  5. 09 5月, 2009 11 次提交
    • A
      Fix races around the access to ->s_options · 2a32cebd
      Al Viro 提交于
      Put generic_show_options read access to s_options under rcu_read_lock,
      split save_mount_options() into "we are setting it the first time"
      (uses in foo_fill_super()) and "we are relacing and freeing the old one",
      synchronize_rcu() before kfree() in the latter.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2a32cebd
    • A
      Switch open_exec() and sys_uselib() to do_open_filp() · 6e8341a1
      Al Viro 提交于
      ... and make path_lookup_open() static
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6e8341a1
    • C
      romfs: cleanup romfs_fs.h · db6c1fbb
      Christoph Hellwig 提交于
      There's no kernel-only content in it anymore, so move it to header-y
      and remove the superflous #ifdef __KERNEL__.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      db6c1fbb
    • A
      New helper: deactivate_locked_super() · 74dbbdd7
      Al Viro 提交于
      Does equivalent of up_write(&s->s_umount); deactivate_super(s);
      However, it does not does not unlock it until it's all over.
      As the result, it's safe to use to dispose of new superblock on ->get_sb()
      failure exits - nobody will see the sucker until it's all over.
      Equivalent using up_write/deactivate_super is safe for that purpose
      if superblock is either	safe to use or has NULL ->s_root when we unlock.
      Normally filesystems take the required precautions, but
      	a) we do have bugs in that area in some of them.
      	b) up_write/deactivate_super sequence is extremely common,
      so the helper makes sense anyway.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      74dbbdd7
    • J
      reiserfs: remove privroot hiding in lookup · 677c9b2e
      Jeff Mahoney 提交于
       With Al Viro's patch to move privroot lookup to fs mount, there's no need
       to have special code to hide the privroot in reiserfs_lookup.
      
       I've also cleaned up the privroot hiding in reiserfs_readdir_dentry and
       removed the last user of reiserfs_xattrs().
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      677c9b2e
    • J
      reiserfs: fixup xattr_root caching · ab17c4f0
      Jeff Mahoney 提交于
       The xattr_root caching was broken from my previous patch set. It wouldn't
       cause corruption, but could cause decreased performance due to allocating
       a larger chunk of the journal (~ 27 blocks) than it would actually use.
      
       This patch loads the xattr root dentry at xattr initialization and creates
       it on-demand. Since we're using the cached dentry, there's no point
       in keeping lookup_or_create_dir around, so that's removed.
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ab17c4f0
    • A
      Always lookup priv_root on reiserfs mount and keep it · edcc37a0
      Al Viro 提交于
      ... even if it's a negative dentry.  That way we can set ->d_op on
      root before anyone could race with us.  Simplify d_compare(), while
      we are at it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      edcc37a0
    • G
      Revert driver core: move platform_data into platform_device · e67c8562
      Greg Kroah-Hartman 提交于
      This reverts commit 006f4571:
      
      	This patch moves platform_data from struct device into
      	struct platform_device, based on the two ideas:
      
      	1. Now all platform_driver is registered by platform_driver_register,
      	   which makes probe()/release()/... of platform_driver passed parameter
      	   of platform_device *, so platform driver can get platform_data from
      	   platform_device;
      
      	2. Other kind of devices do not need to use platform_data, we can
      	   decrease size of device if moving it to platform_device.
      
      	Taking into consideration of thousands of files to be fixed and they
      	can't be finished in one night(maybe it will take a long time), so we
      	keep platform_data in device to allow two kind of cases coexist until
      	all platform devices pass its platfrom data from
      	platform_device->platform_data.
      
      	All patches to do this kind of conversion are welcome.
      
      As we don't really want to do it, it was a bad idea.
      
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      e67c8562
    • P
      perf_counter: add PERF_RECORD_CPU · f370e1e2
      Peter Zijlstra 提交于
      Allow recording the CPU number the event was generated on.
      
      RFC: this leaves a u32 as reserved, should we fill in the
           node_id() there, or leave this open for future extention,
           as userspace can already easily do the cpu->node mapping
           if needed.
      
      [ Impact: extend perfcounter output record format ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      LKML-Reference: <20090508170029.008627711@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f370e1e2
    • P
      perf_counter: add PERF_RECORD_CONFIG · a85f61ab
      Peter Zijlstra 提交于
      Much like CONFIG_RECORD_GROUP records the hw_event.config to
      identify the values, allow to record this for all counters.
      
      [ Impact: extend perfcounter output record format ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      LKML-Reference: <20090508170028.923228280@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a85f61ab
    • P
      perf_counter: rework ioctl()s · 3df5edad
      Peter Zijlstra 提交于
      Corey noticed that ioctl()s on grouped counters didn't work on
      the whole group. This extends the ioctl() interface to take a
      second argument that is interpreted as a flags field. We then
      provide PERF_IOC_FLAG_GROUP to toggle the behaviour.
      
      Having this flag gives the greatest flexibility, allowing you
      to individually enable/disable/reset counters in a group, or
      all together.
      
      [ Impact: fix group counter enable/disable semantics ]
      Reported-by: NCorey Ashford <cjashfor@linux.vnet.ibm.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20090508170028.837558214@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3df5edad
  6. 07 5月, 2009 1 次提交
  7. 06 5月, 2009 4 次提交
  8. 05 5月, 2009 6 次提交
    • P
      netfilter: xt_cluster: fix use of cluster match with 32 nodes · 280f37af
      Pablo Neira Ayuso 提交于
      This patch fixes a problem when you use 32 nodes in the cluster
      match:
      
      % iptables -I PREROUTING -t mangle -i eth0 -m cluster \
        --cluster-total-nodes  32  --cluster-local-node  32 \
        --cluster-hash-seed 0xdeadbeef -j MARK --set-mark 0xffff
      iptables: Invalid argument. Run `dmesg' for more information.
      % dmesg | tail -1
      xt_cluster: this node mask cannot be higher than the total number of nodes
      
      The problem is related to this checking:
      
      if (info->node_mask >= (1 << info->total_nodes)) {
      	printk(KERN_ERR "xt_cluster: this node mask cannot be "
      			"higher than the total number of nodes\n");
      	return false;
      }
      
      (1 << 32) is 1. Thus, the checking fails.
      
      BTW, I said this before but I insist: I have only tested the cluster
      match with 2 nodes getting ~45% extra performance in an active-active setup.
      The maximum limit of 32 nodes is still completely arbitrary. I'd really
      appreciate if people that have more nodes in their setups let me know.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      280f37af
    • P
      netfilter: add missing linux/types.h include to xt_LED.h · a7ca7fcc
      Patrick McHardy 提交于
      Pointed out by Dave Miller:
      
        CHECK   include/linux/netfilter (57 files)
      /home/davem/src/GIT/net-2.6/usr/include/linux/netfilter/xt_LED.h:6: found __[us]{8,16,32,64} type without #include <linux/types.h>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      a7ca7fcc
    • M
      Bluetooth: Fix issue with sysfs handling for connections · a67e899c
      Marcel Holtmann 提交于
      Due to a semantic changes in flush_workqueue() the current approach of
      synchronizing the sysfs handling for connections doesn't work anymore. The
      whole approach is actually fully broken and based on assumptions that are
      no longer valid.
      
      With the introduction of Simple Pairing support, the creation of low-level
      ACL links got changed. This change invalidates the reason why in the past
      two independent work queues have been used for adding/removing sysfs
      devices. The adding of the actual sysfs device is now postponed until the
      host controller successfully assigns an unique handle to that link. So
      the real synchronization happens inside the controller and not the host.
      
      The only left-over problem is that some internals of the sysfs device
      handling are not initialized ahead of time. This leaves potential access
      to invalid data and can cause various NULL pointer dereferences. To fix
      this a new function makes sure that all sysfs details are initialized
      when an connection attempt is made. The actual sysfs device is only
      registered when the connection has been successfully established. To
      avoid a race condition with the registration, the check if a device is
      registered has been moved into the removal work.
      
      As an extra protection two flush_work() calls are left in place to
      make sure a previous add/del work has been completed first.
      
      Based on a report by Marc Pignat <marc.pignat@hevs.ch>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Tested-by: NJustin P. Mattock <justinmattock@gmail.com>
      Tested-by: NRoger Quadros <ext-roger.quadros@nokia.com>
      Tested-by: NMarc Pignat <marc.pignat@hevs.ch>
      a67e899c
    • O
      usbnet: CDC EEM support (v5) · 9f722c09
      Omar Laazimani 提交于
      This introduces a CDC Ethernet Emulation Model (EEM) host side
      driver to support USB EEM devices.
      
      EEM is different from the Ethernet Control Model (ECM) currently
      supported by the "CDC Ethernet" driver.  One key difference is
      that it doesn't require of USB interface alternate settings to
      manage interface state; some maldesigned hardware can't handle
      that part of USB.  It also avoids a separate USB interface for
      control and status updates.
      
      [ dbrownell@users.sourceforge.net: fix skb leaks, add rx packet
      checks, improve fault handling, EEM conformance updates, cleanup ]
      Signed-off-by: NOmar Laazimani <omar.oberthur@gmail.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f722c09
    • S
      tcp: Fix tcp_prequeue() to get correct rto_min value · 0c266898
      Satoru SATOH 提交于
      tcp_prequeue() refers to the constant value (TCP_RTO_MIN) regardless of
      the actual value might be tuned. The following patches fix this and make
      tcp_prequeue get the actual value returns from tcp_rto_min().
      Signed-off-by: NSatoru SATOH <satoru.satoh@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c266898
    • I
      perf_counter: initialize the per-cpu context earlier · 0d905bca
      Ingo Molnar 提交于
      percpu scheduling for perfcounters wants to take the context lock,
      but that lock first needs to be initialized. Currently it is an
      early_initcall() - but that is too late, the task tick runs much
      sooner than that.
      
      Call it explicitly from the scheduler init sequence instead.
      
      [ Impact: fix access-before-init crash ]
      
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0d905bca
  9. 03 5月, 2009 6 次提交
  10. 02 5月, 2009 1 次提交