1. 23 12月, 2006 4 次提交
  2. 21 12月, 2006 3 次提交
  3. 17 12月, 2006 1 次提交
    • L
      Make workqueue bit operations work on "atomic_long_t" · a08727ba
      Linus Torvalds 提交于
      On architectures where the atomicity of the bit operations is handled by
      external means (ie a separate spinlock to protect concurrent accesses),
      just doing a direct assignment on the workqueue data field (as done by
      commit 4594bf15) can cause the
      assignment to be lost due to lack of serialization with the bitops on
      the same word.
      
      So we need to serialize the assignment with the locks on those
      architectures (notably older ARM chips, PA-RISC and sparc32).
      
      So rather than using an "unsigned long", let's use "atomic_long_t",
      which already has a safe assignment operation (atomic_long_set()) on
      such architectures.
      
      This requires that the atomic operations use the same atomicity locks as
      the bit operations do, but that is largely the case anyway.  Sparc32
      will probably need fixing.
      
      Architectures (including modern ARM with LL/SC) that implement sane
      atomic operations for SMP won't see any of this matter.
      
      Cc: Russell King <rmk+lkml@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: David Miller <davem@davemloft.com>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Linux Arch Maintainers <linux-arch@vger.kernel.org>
      Cc: Andrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a08727ba
  4. 16 12月, 2006 1 次提交
    • L
      Remove stack unwinder for now · d1526e2c
      Linus Torvalds 提交于
      It has caused more problems than it ever really solved, and is
      apparently not getting cleaned up and fixed.  We can put it back when
      it's stable and isn't likely to make warning or bug events worse.
      
      In the meantime, enable frame pointers for more readable stack traces.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d1526e2c
  5. 14 12月, 2006 17 次提交
    • D
      Driver core: deprecate PM_LEGACY, default it to N · f89bce3d
      David Brownell 提交于
      Deprecate the old "legacy" PM API, and more importantly default it to "n".
      Virtually nothing in-tree uses it any more.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f89bce3d
    • K
      Driver core: show "initstate" of module · 1f71740a
      Kay Sievers 提交于
      Show the initialization state(live, coming, going) of the module:
        $ cat /sys/module/usbcore/initstate
        live
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1f71740a
    • R
      [PATCH] Optimize D-cache alias handling on fork · ec8c0446
      Ralf Baechle 提交于
      Virtually index, physically tagged cache architectures can get away
      without cache flushing when forking.  This patch adds a new cache
      flushing function flush_cache_dup_mm(struct mm_struct *) which for the
      moment I've implemented to do the same thing on all architectures
      except on MIPS where it's a no-op.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ec8c0446
    • E
      [PATCH] Optimize calc_load() · cd7175ed
      Eric Dumazet 提交于
      calc_load() is called by timer interrupt to update avenrun[].  It currently
      calls nr_active() at each timer tick (HZ per second), while the update of
      avenrun[] is done only once every 5 seconds.  (LOAD_FREQ=5 Hz)
      
      nr_active() is quite expensive on SMP machines, since it has to sum up
      nr_running and nr_uninterruptible of all online CPUS, bringing foreign
      dirty cache lines.
      
      This patch is an optimization of calc_load() so that nr_active() is called
      only if we need it.
      
      The use of unlikely() is welcome since the condition is true only once every
      5*HZ time.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Acked-by: N"Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cd7175ed
    • R
      [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() · cd861280
      Robert P. J. Day 提交于
      All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
      equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
      ordering of the first two arguments are fixed.
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cd861280
    • I
      [PATCH] lockdep: fix possible races while disabling lock-debugging · 74c383f1
      Ingo Molnar 提交于
      Jarek Poplawski noticed that lockdep global state could be accessed in a
      racy way if one CPU did a lockdep assert (shutting lockdep down), while the
      other CPU would try to do something that changes its global state.
      
      This patch fixes those races and cleans up lockdep's internal locking by
      adding a graph_lock()/graph_unlock()/debug_locks_off_graph_unlock helpers.
      
      (Also note that as we all know the Linux kernel is, by definition, bug-free
      and perfect, so this code never triggers, so these fixes are highly
      theoretical.  I wrote this patch for aesthetic reasons alone.)
      
      [akpm@osdl.org: build fix]
      [jarkao2@o2.pl: build fix's refix]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NJarek Poplawski <jarkao2@o2.pl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      74c383f1
    • I
      [PATCH] lockdep: print irq-trace info on asserts · 3117df04
      Ingo Molnar 提交于
      When we print an assert due to scheduling-in-atomic bugs, and if lockdep
      is enabled, then the IRQ tracing information of lockdep can be printed
      to pinpoint the code location that disabled interrupts. This saved me
      quite a bit of debugging time in cases where the backtrace did not
      identify the irq-disabling site well enough.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3117df04
    • I
      [PATCH] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too · 27c3b232
      Ingo Molnar 提交于
      CONFIG_DEBUG_LOCKDEP is unacceptably slow because it does not utilize
      the chain-hash. Turn the chain-hash back on in this case too.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      27c3b232
    • I
      [PATCH] lockdep: clean up VERY_VERBOSE define · 33e94e96
      Ingo Molnar 提交于
      Cleanup: the VERY_VERBOSE define was unnecessarily dependent on #ifdef VERBOSE
      - while the VERBOSE switch is 0 or 1 (always defined).
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      33e94e96
    • I
      [PATCH] lockdep: improve lockdep_reset() · 23d95a03
      Ingo Molnar 提交于
      Clear all the chains during lockdep_reset().  This fixes some locking-selftest
      false positives i saw on -rt.  (never saw those on mainline though, but it
      could happen.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      23d95a03
    • I
      [PATCH] lockdep: improve verbose messages · 81fc685a
      Ingo Molnar 提交于
      Make verbose lockdep messages (off by default) more informative by printing
      out the hash chain key.  (this patch was what helped me catch the earlier
      lockdep hash-collision bug)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      81fc685a
    • I
      [PATCH] lockdep: filter off by default · a6640897
      Ingo Molnar 提交于
      Fix typo in the class_filter() function.  (filtering is not used by default so
      this only affects lockdep-internal debugging cases)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a6640897
    • I
      [PATCH] debug: add sysrq_always_enabled boot option · 5d6f647f
      Ingo Molnar 提交于
      Most distributions enable sysrq support but set it to 0 by default.  Add a
      sysrq_always_enabled boot option to always-enable sysrq keys.  Useful for
      debugging - without having to modify the disribution's config files (which
      might not be possible if the kernel is on a live CD, etc.).
      
      Also, while at it, clean up the sysrq interfaces.
      
      [bunk@stusta.de: make sysrq_always_enabled_setup() static]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5d6f647f
    • R
      [PATCH] PM: Fix SMP races in the freezer · 8a102eed
      Rafael J. Wysocki 提交于
      Currently, to tell a task that it should go to the refrigerator, we set the
      PF_FREEZE flag for it and send a fake signal to it.  Unfortunately there
      are two SMP-related problems with this approach.  First, a task running on
      another CPU may be updating its flags while the freezer attempts to set
      PF_FREEZE for it and this may leave the task's flags in an inconsistent
      state.  Second, there is a potential race between freeze_process() and
      refrigerator() in which freeze_process() running on one CPU is reading a
      task's PF_FREEZE flag while refrigerator() running on another CPU has just
      set PF_FROZEN for the same task and attempts to reset PF_FREEZE for it.  If
      the refrigerator wins the race, freeze_process() will state that PF_FREEZE
      hasn't been set for the task and will set it unnecessarily, so the task
      will go to the refrigerator once again after it's been thawed.
      
      To solve first of these problems we need to stop using PF_FREEZE to tell
      tasks that they should go to the refrigerator.  Instead, we can introduce a
      special TIF_*** flag and use it for this purpose, since it is allowed to
      change the other tasks' TIF_*** flags and there are special calls for it.
      
      To avoid the freeze_process()-refrigerator() race we can make
      freeze_process() to always check the task's PF_FROZEN flag after it's read
      its "freeze" flag.  We should also make sure that refrigerator() will
      always reset the task's "freeze" flag after it's set PF_FROZEN for it.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8a102eed
    • R
      [PATCH] PM: Fix freezing of stopped tasks · 3df494a3
      Rafael J. Wysocki 提交于
      Currently, if a task is stopped (ie.  it's in the TASK_STOPPED state), it
      is considered by the freezer as unfreezeable.  However, there may be a race
      between the freezer and the delivery of the continuation signal to the task
      resulting in the task running after we have finished freezing the other
      tasks.  This, in turn, may lead to undesirable effects up to and including
      data corruption.
      
      To prevent this from happening we first need to make the freezer consider
      stopped tasks as freezeable.  For this purpose we need to make freezeable()
      stop returning 0 for these tasks and we need to force them to enter the
      refrigerator.  However, if there's no continuation signal in the meantime,
      the stopped tasks should remain stopped after all processes have been
      thawed, so we need to send an additional SIGSTOP to each of them before
      waking it up.
      
      Also, a stopped task that has just been woken up should first check if
      there's a freezing request for it and go to the refrigerator if that's the
      case.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3df494a3
    • P
      [PATCH] cpuset: rework cpuset_zone_allowed api · 02a0e53d
      Paul Jackson 提交于
      Elaborate the API for calling cpuset_zone_allowed(), so that users have to
      explicitly choose between the two variants:
      
        cpuset_zone_allowed_hardwall()
        cpuset_zone_allowed_softwall()
      
      Until now, whether or not you got the hardwall flavor depended solely on
      whether or not you or'd in the __GFP_HARDWALL gfp flag to the gfp_mask
      argument.
      
      If you didn't specify __GFP_HARDWALL, you implicitly got the softwall
      version.
      
      Unfortunately, this meant that users would end up with the softwall version
      without thinking about it.  Since only the softwall version might sleep,
      this led to bugs with possible sleeping in interrupt context on more than
      one occassion.
      
      The hardwall version requires that the current tasks mems_allowed allows
      the node of the specified zone (or that you're in interrupt or that
      __GFP_THISNODE is set or that you're on a one cpuset system.)
      
      The softwall version, depending on the gfp_mask, might allow a node if it
      was allowed in the nearest enclusing cpuset marked mem_exclusive (which
      requires taking the cpuset lock 'callback_mutex' to evaluate.)
      
      This patch removes the cpuset_zone_allowed() call, and forces the caller to
      explicitly choose between the hardwall and the softwall case.
      
      If the caller wants the gfp_mask to determine this choice, they should (1)
      be sure they can sleep or that __GFP_HARDWALL is set, and (2) invoke the
      cpuset_zone_allowed_softwall() routine.
      
      This adds another 100 or 200 bytes to the kernel text space, due to the few
      lines of nearly duplicate code at the top of both cpuset_zone_allowed_*
      routines.  It should save a few instructions executed for the calls that
      turned into calls of cpuset_zone_allowed_hardwall, thanks to not having to
      set (before the call) then check (within the call) the __GFP_HARDWALL flag.
      
      For the most critical call, from get_page_from_freelist(), the same
      instructions are executed as before -- the old cpuset_zone_allowed()
      routine it used to call is the same code as the
      cpuset_zone_allowed_softwall() routine that it calls now.
      
      Not a perfect win, but seems worth it, to reduce this chance of hitting a
      sleeping with irq off complaint again.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      02a0e53d
    • E
      [PATCH] Revert "[PATCH] identifier to nsproxy" · 5f8442ed
      Eric W. Biederman 提交于
      This reverts commit 373beb35.
      
      No one is using this identifier yet.  The purpose of this identifier is to
      export nsproxy to user space which is wrong.  nsproxy is an internal
      implementation optimization, which should keep our fork times from getting
      slower as we increase the number of global namespaces you don't have to
      share.
      
      Adding a global identifier like this is inappropriate because it makes
      namespaces inherently non-recursive, greatly limiting what we can do with
      them in the future.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Cedric Le Goater <clg@fr.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5f8442ed
  6. 11 12月, 2006 14 次提交