]> git.hungrycats.org Git - linux/log
linux
22 years ago[PATCH] s390: zfcp host adapter
Andrew Morton [Fri, 14 May 2004 12:50:22 +0000 (05:50 -0700)]
[PATCH] s390: zfcp host adapter

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

zfcp host adapter change:
 - Prevent infinite retry of SCSI commands when FCP adapter is unavailable.
 - Always queue error recovery structure to the error recovery running list.
 - Add help text to zfcp config option.

22 years ago[PATCH] s390: 3270 console driver
Andrew Morton [Fri, 14 May 2004 12:50:11 +0000 (05:50 -0700)]
[PATCH] s390: 3270 console driver

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

3270 device driver change:
 - Don't allow activation of views while the initial size sensing is still
   in progress. Replace RAW3270_FLAGS_SHUTDOWN with RAW3270_FLAGS_READY.
 - Make 3270 views loadable as modules.

22 years ago[PATCH] s390: dasd driver
Andrew Morton [Fri, 14 May 2004 12:50:00 +0000 (05:50 -0700)]
[PATCH] s390: dasd driver

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

dasd driver changes:
 - Do error recovery for error recovery requests.
 - Retry request if the start_IO failed because of a timeout.

22 years ago[PATCH] s390: common i/o layer
Andrew Morton [Fri, 14 May 2004 12:49:49 +0000 (05:49 -0700)]
[PATCH] s390: common i/o layer

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

Common i/o layer changes:
 - Delay unregister/register of ccw devices reappering on a different
   subchannel. Search for the old ccw_device & subchannel for the
   reattached device and deregister it too to avoid inconsistencies.
 - Fix path grouping for devices that present command reject for
   SetPGID but not for SensePGID.

22 years ago[PATCH] s390: core
Andrew Morton [Fri, 14 May 2004 12:49:38 +0000 (05:49 -0700)]
[PATCH] s390: core

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

s390 core changes:
 - Rename idle_cpu_mask to nohz_cpu_mask as agreed with Dipankar.
 - Refine compiler version check for "Q" constraints in uaccess.h.
 - Store per process ptrace information to the correct place.
 - Fix per cpu data access for 64-bit modules.
 - Add topology_init function for cpu hotplug.
 - Define TASK_SIZE dependent on TIF_31BIT and define MM_VM_SIZE
   to 4TB to get rid of elf_map32 and arch_get_unmapped_area.

22 years ago[PATCH] Add del_single_shot_timer()
Andrew Morton [Fri, 14 May 2004 12:49:27 +0000 (05:49 -0700)]
[PATCH] Add del_single_shot_timer()

From: Geoff Gustafson <geoff@linux.jf.intel.com>,
      "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
      Ingo Molnar <mingo@elte.hu>,
      me.

The big-SMP guys are seeing high CPU load due to del_timer_sync()'s
inefficiencies.  The callers are fs/aio.c and schedule_timeout().

We note that neither of these callers' timer handlers actually re-add the
timer - they are single-shot.

So we don't need all that complexity in del_timer_sync() - we can just run
del_timer() and if that worked we know the timer is dead.

Add del_single_shot_timer(), export it to modules and use it in AIO and
schedule_timeout().

(these numbers are for an earlier patch, but they'll be close)

Before:             32p     4p
     Warm cache   29,000    505
     Cold cache   37,800   1220

After:              32p     4p
     Warm cache       95     88
     Cold cache    1,800    140

[Measurements are CPU cycles spent in a call to del_timer_sync, the average
of 1000 calls. 32p is 16-node NUMA, 4p is SMP.]

(I cleaned up a few things and added some commentary)

22 years ago[PATCH] H8/300: more cleanup
Andrew Morton [Fri, 14 May 2004 12:49:16 +0000 (05:49 -0700)]
[PATCH] H8/300: more cleanup

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- gcc-3.4 warning fix.
- io access address fix.
- cleanup code.

22 years ago[PATCH] H8/300: delete headers
Andrew Morton [Fri, 14 May 2004 12:49:05 +0000 (05:49 -0700)]
[PATCH] H8/300: delete headers

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- Delete obsolete header files

22 years ago[PATCH] H8/300: Kconfig
Andrew Morton [Fri, 14 May 2004 12:48:53 +0000 (05:48 -0700)]
[PATCH] H8/300: Kconfig

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- Separate taget depends config.

22 years ago[PATCH] H8/300: ne driver
Andrew Morton [Fri, 14 May 2004 12:48:42 +0000 (05:48 -0700)]
[PATCH] H8/300: ne driver

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- ne2k compatible NIC support

22 years ago[PATCH] H8/300: SCI driver fix
Andrew Morton [Fri, 14 May 2004 12:48:31 +0000 (05:48 -0700)]
[PATCH] H8/300: SCI driver fix

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- fix h8300 depend setup sequence

22 years ago[PATCH] H8/300: preempt support
Andrew Morton [Fri, 14 May 2004 12:48:20 +0000 (05:48 -0700)]
[PATCH] H8/300: preempt support

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- add preempt support
- add new syscalls
- code cleanup

22 years ago[PATCH] H/8300 pic support fix
Andrew Morton [Fri, 14 May 2004 12:48:09 +0000 (05:48 -0700)]
[PATCH] H/8300 pic support fix

From: Yoshinori Sato <ysato@users.sourceforge.jp>

Sorry. There was the file which lacked.

22 years ago[PATCH] H8/300: pic support
Andrew Morton [Fri, 14 May 2004 12:47:58 +0000 (05:47 -0700)]
[PATCH] H8/300: pic support

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- add PIC binary support

22 years ago[PATCH] H8/300: ldscripts fix
Andrew Morton [Fri, 14 May 2004 12:47:47 +0000 (05:47 -0700)]
[PATCH] H8/300: ldscripts fix

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- symbol prefix (use h8300 and v850) support
- include headers

22 years ago[PATCH] H8/300: bitops.h add find_next_bit
Andrew Morton [Fri, 14 May 2004 12:47:36 +0000 (05:47 -0700)]
[PATCH] H8/300: bitops.h add find_next_bit

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- add find_next_bit

22 years ago[PATCH] dentry layout tweaks
Andrew Morton [Fri, 14 May 2004 12:47:27 +0000 (05:47 -0700)]
[PATCH] dentry layout tweaks

Lookup typically touches three fields of the dentry: d_bucket, d_name.hash and
d_parent.

Change the layout of things so that these will always be in the same
cacheline.

22 years ago[PATCH] more dentry shrinkage
Andrew Morton [Fri, 14 May 2004 12:47:16 +0000 (05:47 -0700)]
[PATCH] more dentry shrinkage

- d_vfs_flags can be removed - just use d_flags.  All modifications of
  dentry->d_flags are under dentry->d_lock.

On x86 this takes the internal string size up to 40 bytes.  The
internal/external ratio on my 1.5M files hits 96%.

22 years ago[PATCH] dentry d_bucket fix
Andrew Morton [Fri, 14 May 2004 12:47:06 +0000 (05:47 -0700)]
[PATCH] dentry d_bucket fix

The gap between checking d_bucket and sampling d_move_count looks like a bug
to me.

It feels safer to be checking d_bucket after taking the lock, when we know
that it is stable.

And it's a little faster to check d_bucket after having checked the hash
rather than before.

22 years ago[PATCH] dentry qstr consolidation
Andrew Morton [Fri, 14 May 2004 12:46:55 +0000 (05:46 -0700)]
[PATCH] dentry qstr consolidation

When dentries are given an external name we currently allocate an entire qstr
for the external name.

This isn't needed.  We can use the internal qstr and kmalloc only the string
itself.  This saves 12 bytes from externally-allocated names and 4 bytes from
the dentry itself.

The saving of 4 bytes from the dentry doesn't actually decrease the dentry's
storage requirements, but it makes four more bytes available for internal
names, taking the internal/external ratio from 89% up to 93% on my 1.5M files.

Fix:

The qstr consolidation wasn't quite right, because it can cause qstr->len to
be unstable during lookup lockless traverasl.

Fix that up by taking d_lock earlier in lookup.  This serialises against
d_move.

Take the lock after comparing the parent and hash to preserve the
mostly-lockless behaviour.

This obsoletes d_movecount, which is removed.

22 years ago[PATCH] dentry shrinkage
Andrew Morton [Fri, 14 May 2004 12:46:44 +0000 (05:46 -0700)]
[PATCH] dentry shrinkage

Rework dentries so that the inline name length is between 31 and 48 bytes.

On SMP P4-compiled x86 each dentry consumes 160 bytes (24 per page).

Here's the histogram of name lengths on all 1.5M files on my workstation:

1:  0%
2:  0%
3:  1%
4:  5%
5:  8%
6:  13%
7:  19%
8:  26%
9:  33%
10:  42%
11:  49%
12:  55%
13:  60%
14:  64%
15:  67%
16:  69%
17:  71%
18:  73%
19:  75%
20:  76%
21:  78%
22:  79%
23:  80%
24:  81%
25:  82%
26:  83%
27:  85%
28:  86%
29:  87%
30:  88%
31:  89%
32:  90%
33:  91%
34:  92%
35:  93%
36:  94%
37:  95%
38:  96%
39:  96%
40:  96%
41:  96%
42:  96%
43:  96%
44:  97%
45:  97%
46:  97%
47:  97%
48:  97%
49:  98%
50:  98%
51:  98%
52:  98%
53:  98%
54:  98%
55:  98%
56:  98%
57:  98%
58:  98%
59:  98%
60:  99%
61:  99%
62:  99%
63:  99%
64:  99%

So on x86 we'll fit 89% of filenames into the inline name.

The patch also removes the NAME_ALLOC_LEN() rounding-up of the storage for the
out-of-line names.  That seems unnecessary.

22 years ago[PATCH] d_vfs_flags locking fix
Andrew Morton [Fri, 14 May 2004 12:46:33 +0000 (05:46 -0700)]
[PATCH] d_vfs_flags locking fix

Be consistent about d_vfs_flags locking: take dentry->d_lock when modifying
it.

22 years ago[PATCH] d_flags locking fixes
Andrew Morton [Fri, 14 May 2004 12:46:23 +0000 (05:46 -0700)]
[PATCH] d_flags locking fixes

A few filesystems modify dentry.d_flags under non-obvious locking.  To
consolidate that field wth d_vfs_flags they need to take ->d_lock

22 years ago[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-makefile-cleanup.patch
Andrew Morton [Fri, 14 May 2004 12:46:12 +0000 (05:46 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-makefile-cleanup.patch

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

* The Kconfig and Makefile in drivers/message/i2o still got a CONFIG_I2O_PCI
  entry, which is not used anymore.  This one is replaced by a
  CONFIG_I2O_CONFIG entry, which now builds the i2o_config module.

22 years ago[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-64-bit-fix.patch
Andrew Morton [Fri, 14 May 2004 12:46:01 +0000 (05:46 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-64-bit-fix.patch

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

* provides i2o_context_list_*() functions, which maps 64-bit pointers to
  32-bit context id's in a dynamic list.  On 32-bit systems the functions are
  replaced with a static inline.

* i2o_scsi now uses the i2o_context_list_*() functions for transaction
  context, and therefore now work on 64-bit systems too.

22 years ago[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o_block-cleanup.patch
Andrew Morton [Fri, 14 May 2004 12:45:50 +0000 (05:45 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o_block-cleanup.patch

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

* more than 3 "visible" disks (hda, hdb, hdc, hdd) lead to kernel panics.

* removes some unused code with partitions.

* I2O_LOCK was often called with the addresses of the controller, and not
  with the address of the device.  Fixed.

* the cleanup function for gendisk (del_gendisk) doesn't work if the queue
  is shared between different devices.  To workaround the queue is removed
  before.

* redundant code removed in module initialization and remove, use
  i2ob_new_device and i2ob_del_device instead.

* removed atomic_t queue_depth

* removed unnecessary and bogus code for queue handling

22 years ago[PATCH] i2o: 64-bit fixes
Andrew Morton [Fri, 14 May 2004 12:45:39 +0000 (05:45 -0700)]
[PATCH] i2o: 64-bit fixes

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

Fix 64-bit problems.

22 years ago[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-passthru.patch
Andrew Morton [Fri, 14 May 2004 12:45:29 +0000 (05:45 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-passthru.patch

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

* Add a pass-thru ioctl to i2o_config, which is needed to work with the
  Adaptec management software.

22 years ago[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-config-clean.patch
Andrew Morton [Fri, 14 May 2004 12:45:18 +0000 (05:45 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-config-clean.patch

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

* Changes the formating of the header in i2o_config.c

22 years ago[PATCH] Module ref counting for vt console drivers
Andrew Morton [Fri, 14 May 2004 12:45:07 +0000 (05:45 -0700)]
[PATCH] Module ref counting for vt console drivers

From: Herbert Xu <herbert@gondor.apana.org.au>

The following patch adds basic module reference counting to vt console
drivers.  Currently modules like fbcon are not counted at all.

22 years ago[PATCH] ia64 cpu hotplug: core
Andrew Morton [Fri, 14 May 2004 12:44:57 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: core

From: Ashok Raj <ashok.raj@intel.com>

Supports basic ability to enable hotplug functions for IA64.
Code is just evolving, and there are several loose ends to tie up.

What this code drop does
- Support logical online and offline
- Handles interrupt migration without loss of interrupts.
- Handles stress fine > 24+ hrs with make -j/ftp/rcp workloads
- Handles irq migration from a dying cpu without loss of interrupts.

What needs to be done
- Boot CPU removal support, with platform level authentication
- Putting cpu being removed in BOOT_RENDEZ mode.

22 years ago[PATCH] Revisited: ia64-cpu-hotplug-cpu_present.patch
Andrew Morton [Fri, 14 May 2004 12:44:45 +0000 (05:44 -0700)]
[PATCH] Revisited: ia64-cpu-hotplug-cpu_present.patch

From: Paul Jackson <pj@sgi.com>

With a hotplug capable kernel, there is a requirement to distinguish a
possible CPU from one actually present.  The set of possible CPU numbers
doesn't change during a single system boot, but the set of present CPUs
changes as CPUs are physically inserted into or removed from a system.  The
cpu_possible_map does not change once initialized at boot, but the
cpu_present_map changes dynamically as CPUs are inserted or removed.

Paul Jackson <pj@sgi.com> provided an expanded explanation:

Ashok's cpu hot plug patch adds a cpu_present_map, resulting in the following
cpu maps being available.  All the following maps are fixed size bitmaps of
size NR_CPUS.

#ifdef CONFIG_HOTPLUG_CPU
cpu_possible_map - map with all NR_CPUS bits set
cpu_present_map - map with bit 'cpu' set iff cpu is populated
cpu_online_map - map with bit 'cpu' set iff cpu available to scheduler
#else
cpu_possible_map - map with bit 'cpu' set iff cpu is populated
cpu_present_map - copy of cpu_possible_map
cpu_online_map - map with bit 'cpu' set iff cpu available to scheduler
#endif

In either case, NR_CPUS is fixed at compile time, as the static size of these
bitmaps.  The cpu_possible_map is fixed at boot time, as the set of CPU id's
that it is possible might ever be plugged in at anytime during the life of
that system boot.  The cpu_present_map is dynamic(*), representing which CPUs
are currently plugged in.  And cpu_online_map is the dynamic subset of
cpu_present_map, indicating those CPUs available for scheduling.

If HOTPLUG is enabled, then cpu_possible_map is forced to have all NR_CPUS
bits set, otherwise it is just the set of CPUs that ACPI reports present at
boot.

If HOTPLUG is enabled, then cpu_present_map varies dynamically, depending on
what ACPI reports as currently plugged in, otherwise cpu_present_map is just a
copy of cpu_possible_map.

(*) Well, cpu_present_map is dynamic in the hotplug case.  If not hotplug,
    it's the same as cpu_possible_map, hence fixed at boot.

22 years ago[PATCH] ia64 cpu hotplug: /proc rework
Andrew Morton [Fri, 14 May 2004 12:44:34 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: /proc rework

From: Ashok Raj <ashok.raj@intel.com>

Changes proc entries for cpu hotplug to be created via the cpu hotplug
notifier callbacks.  Also fixed a bug in the removal code that did not remove
proc entries as expected.

22 years ago[PATCH] ia64 cpu hotplug: IRQ affinity work
Andrew Morton [Fri, 14 May 2004 12:44:23 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: IRQ affinity work

From: Ashok Raj <ashok.raj@intel.com>

irq affinity setting via /proc was forcing iosapic rte programming by force.
The correct way to do this is to perform this when a interrupt is pending.

22 years ago[PATCH] ia64 cpu hotplug: sysfs additions
Andrew Morton [Fri, 14 May 2004 12:44:13 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: sysfs additions

From: Ashok Raj <ashok.raj@intel.com>

Creation of sysfs via topology_init() creates sysfs entries.  The creation of
the online control file is created separately when the cpu_up is invoked in
arch independent code.

22 years ago[PATCH] ia64 cpu hotplug: init section fixes
Andrew Morton [Fri, 14 May 2004 12:44:02 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: init section fixes

From: Ashok Raj <ashok.raj@intel.com>

Contains changes from __init to __devinit to support cpu hotplug Changes only
arch/ia64 portions of the kernel tree.

22 years ago[PATCH] ia64 cpu hotplug: core kernel initialisation
Andrew Morton [Fri, 14 May 2004 12:43:50 +0000 (05:43 -0700)]
[PATCH] ia64 cpu hotplug: core kernel initialisation

From: Ashok Raj <ashok.raj@intel.com>

This patch changes __init to __devinit to init_idle so that when a new cpu
arrives, it can call these functions at a later time.

22 years ago[PATCH] swap speedups and fix
Andrew Morton [Fri, 14 May 2004 12:43:39 +0000 (05:43 -0700)]
[PATCH] swap speedups and fix

From: Andrea Arcangeli <andrea@suse.de>

I don't think we need an install_swap_bdev/remove_swap_bdev anymore, we should
use the swap_info->bdev, not the swap_bdevs.  the swap_info already has a
->bdev field, the only point of remove_swap_bdev/install_swap_bdev was to
unplug all devices as efficiently as possible, we don't need that anymore with
the page parameter.

Plus the semaphore should be a rwsem to allow parallel unplug from multiple
pages.

After that I don't need to take the semaphore anymore during swapon, no
swapcache with swp_type() pointing to such bdev, will be allowed until swapon
is complete (SWP_ACTIVE is set a lot later after setting p->bdev).

In swapoff I only need a dummy serialization with the readers, after
try_to_unuse is complete:

  err = try_to_unuse(type);
  current->flags &= ~PF_SWAPOFF;

  /* wait for any unplug function to finish */
  down_write(&swap_unplug_sem);
  up_write(&swap_unplug_sem);

that's all, no other locking and no install_swap_bdev/remove_swap_bdev.

(and the swap_bdevs[] compression code was busted)

22 years ago[PATCH] blk_run_page(): we don't trust bh->b_page
Andrew Morton [Fri, 14 May 2004 12:43:29 +0000 (05:43 -0700)]
[PATCH] blk_run_page(): we don't trust bh->b_page

We don't trust bh->b_page to point to the right thing across all filesystems,
so revert this bit.

22 years ago[PATCH] blk_run_page(): fixup for swap_unplug_io_fn()
Andrew Morton [Fri, 14 May 2004 12:43:18 +0000 (05:43 -0700)]
[PATCH] blk_run_page(): fixup for swap_unplug_io_fn()

22 years ago[PATCH] Add blk_run_page()
Andrew Morton [Fri, 14 May 2004 12:43:07 +0000 (05:43 -0700)]
[PATCH] Add blk_run_page()

From: Andrea Arcangeli <andrea@suse.de>

From: Jens Axboe

Add blk_run_page() API.  This is so that we can pass the target page all the
way down to (for example) the swap unplug function.  So swap can work out
which blockdevs back this particular page.

22 years ago[PATCH] rmap-5-swap_unplug-page-revert
Andrew Morton [Fri, 14 May 2004 12:42:56 +0000 (05:42 -0700)]
[PATCH] rmap-5-swap_unplug-page-revert

Revert the pre-2.6.6 per-address-space unplugging changes.  This removes a
swapper_space exceptionality, syncs things with Andrea and provides for
simplification of the swap unplug function.

22 years ago[PATCH] rename rmap_lock to page_map_lock
Andrew Morton [Fri, 14 May 2004 12:42:45 +0000 (05:42 -0700)]
[PATCH] rename rmap_lock to page_map_lock

Sync this up with Andrea's patches.

22 years ago[PATCH] filtered wakeups: apply to buffer_head functions
Andrew Morton [Fri, 14 May 2004 12:42:34 +0000 (05:42 -0700)]
[PATCH] filtered wakeups: apply to buffer_head functions

From: William Lee Irwin III <wli@holomorphy.com>

This patch implements wake-one semantics for buffer_head wakeups in a single
step.  The buffer_head being waited on is passed to the waiter's wakeup
function by the waker, and the wakeup function compares that to the a pointer
stored in its on-stack structure and checking the readiness of the bit there
also.  Wake-one semantics are achieved by using WQ_FLAG_EXCLUSIVE in the
codepaths waiting to acquire the bit for mutual exclusion.

22 years ago[PATCH] filtered wakeups: apply to pagecache functions
Andrew Morton [Fri, 14 May 2004 12:42:25 +0000 (05:42 -0700)]
[PATCH] filtered wakeups: apply to pagecache functions

From: William Lee Irwin III <wli@holomorphy.com>

This patch implements wake-one semantics for page wakeups in a single step.
Discrimination between distinct pages is achieved by passing the page to the
wakeup function, which compares it to a pointer in its own on-stack structure
containing the waitqueue element and the page.  Bit discrimination is achieved
by storing the bit number in that same structure and testing the bit in the
wakeup function.  Wake-one semantics are achieved by using WQ_FLAG_EXCLUSIVE
in the codepaths waiting to acquire the bit for mutual exclusion.

22 years ago[PATCH] filtered wakeups: wakeup enhancements
Andrew Morton [Fri, 14 May 2004 12:42:14 +0000 (05:42 -0700)]
[PATCH] filtered wakeups: wakeup enhancements

From: William Lee Irwin III <wli@holomorphy.com>

This patch provides an additional argument to __wake_up_common() so that the
information wakefunc.patch made waiters ready to receive may be passed to them
by wakers.  This is provided as a separate patch so that the overhead of the
additional argument to __wake_up_common() can be measured in isolation.  No
change in performance was observable here.

22 years ago[PATCH] filtered wakeups
Andrew Morton [Fri, 14 May 2004 12:42:03 +0000 (05:42 -0700)]
[PATCH] filtered wakeups

From: William Lee Irwin III <wli@holomorphy.com>

This patch series is solving the "thundering herd" problem that occurs in the
mainline implementation of hashed waitqueues.  There are two sources of
spurious wakeups in such arrangements:

(a) Hash collisions that place waiters on different objects on the same
    waitqueue, which wakes threads falsely when any of the objects hashed to
    the same queue receives a wakeup.  i.e.  loss of information about which
    object a wakeup event is related to.

(b) Loss of information about which object a given waiter is waiting on.
    This precludes wake-one semantics for mutual exclusion scenarios.  For
    instance, a lock bit may be slept on.  If there are any waiters on the
    object, a lock bit release event must wake at least one of them so as to
    prevent deadlock.  But without information as to which waiter is waiting
    on which object, we must resort to waking all waiters who could possibly
    be waiting on it.  Now, as the lock bit provides mutual exclusion, only
    one of the waiters woken can proceed, and the remainder will go back to
    sleep and wait for another event, creating unnecessary system load.  Once
    wake-one semantics are established, only one of the waiters waiting to
    acquire a lock bit need to be woken, which measurably reduces system load
    and improves efficiency (i.e.  it's the subject of the benchmarking I've
    been sending to you).

Even beyond the measurable efficiency gains, there are reasons of robustness
and responsiveness to motivate addressing the issue of thundering herds.  In a
real-life scenario I've been personally involved in resolving, the thundering
herd issue caused powerful modern SMP machines with fast IO systems to be
unresponsive to user input for a minute at a time or more.  Analogues of these
patches for the distro kernels involved fully resolved the issue to the
customer's satisfaction and obviated workarounds to limit the pagecache's
size.

The latest spin of these patches basically shoves more pieces of the logic
into the wakeup functions, with some efficiency gains from sharing the hot
codepath with the rest of the kernel, and a slightly larger diff than the
patches with the newly-introduced entrypoint.  Writing these was motivated by
the push to insulate sched.c from more of the details of wakeup semantics by
putting more of the logic into the wakeup functions.  In order to accomplish
this while still solving (b), the wakeup functions grew a new argument for
communication about what object a wakeup event is related to to be passed by
the waker.

=========

This patch provides an additional argument to wakeup functions so that
information may be passed from the waker to the waiter.  This is provided as a
separate patch so that the overhead of the additional argument can be measured
in isolation.  No change in performance was observable here.

22 years ago[PATCH] do_mounts_rd-malloc-fix
Andrew Morton [Fri, 14 May 2004 12:41:52 +0000 (05:41 -0700)]
[PATCH] do_mounts_rd-malloc-fix

gcc-3.4.0 sez:

init/do_mounts_rd.c:309: warning: conflicting types for built-in function 'malloc'

22 years ago[PATCH] VM accounting fix
Andrew Morton [Fri, 14 May 2004 12:41:41 +0000 (05:41 -0700)]
[PATCH] VM accounting fix

From: Hugh Dickins <hugh@veritas.com>

Stas Sergeev <stsp@aknet.ru> wrote:

   mprotect() fails to merge VMAs because one VMA can end up with
   VM_ACCOUNT flag set, and another without that flag.  That makes several
   apps of mine to malfuncate.

Great find!  Someone has got their test the wrong way round.  Since that
VM_MAYACCT macro is being used in one place only, and just hiding what it's
actually about, fold it into its callsite.

22 years ago[PATCH] revert the process-migration-speedup patch
Andrew Morton [Fri, 14 May 2004 12:41:31 +0000 (05:41 -0700)]
[PATCH] revert the process-migration-speedup patch

David Mosberger asked that this be backed out:

"I do not believe that flushing the TLB before migration is be the right thing
to do on ia64 machines which support global TLB purges (i.e., all but SGI's
machines)."

It was of huge benefit for the SGI machines, so work is ongoing.

22 years ago[PATCH] MSEC_TO_JIFFIES to msec_to_jiffies
Andrew Morton [Fri, 14 May 2004 12:41:20 +0000 (05:41 -0700)]
[PATCH] MSEC_TO_JIFFIES to msec_to_jiffies

Switch all users of MSEC[S]_TO_JIFFIES and JIFFIES_TO_MSEC[S] over to use
jiffies_to_msecs() and msecs_to_jiffies().  Withdraw MSECS_TO_JIFFIES() and
JIFFIES_TO_MSECS() from the kernel API.

22 years ago[PATCH] Covert drivers to use msec_to_jiffies
Andrew Morton [Fri, 14 May 2004 12:41:08 +0000 (05:41 -0700)]
[PATCH] Covert drivers to use msec_to_jiffies

Remove various private implementations of msecs_to_jiffies() and
jiffies_to_msecs().

There are various uppercase versions which should be consolidated.

22 years ago[PATCH] MSEC_TO_JIFFIES consolidation
Andrew Morton [Fri, 14 May 2004 12:40:57 +0000 (05:40 -0700)]
[PATCH] MSEC_TO_JIFFIES consolidation

From: Ingo Molnar <mingo@elte.hu>

We have various different implementations of MSEC[S]_TO_JIFFIES and
JIFFIES_TO_MSEC[S].  We recently had a compile-time clash in USB.

Fix all that up.

- The SCTP version was very inefficient.  Hopefully this version is accurate
  enough.

- Optimise for the HZ=100 and HZ=1000 cases

- This version does round-up, so sleep(9 milliseconds) works OK on 100HZ.

- We still have lots of jiffies_to_msec and msec_to_jiffies implementations.

From: William Lee Irwin III <wli@holomorphy.com>

  Optimize the cases where HZ is a divisor of 1000 or vice-versa in
  JIFFIES_TO_MSECS() and MSECS_TO_JIFFIES() by allowing the nonvanishing(!)
  integral ratios to appear as a parenthesized expressions eligible for
  constant folding optimizations.

From: me

  Use typesafe inlines for the jiffies-to-millisecond conversion functions.

  This means that milliseconds officially takes the type `unsigned int'.
  All current callers seem to be OK with that.

  Drivers need to be fixed up to use this instead of their private versions.

22 years ago[PATCH] sched: add missing local_irq_enable()
Andrew Morton [Fri, 14 May 2004 12:40:46 +0000 (05:40 -0700)]
[PATCH] sched: add missing local_irq_enable()

From: Nick Piggin <nickpiggin@yahoo.com.au>

this_rq_lock does a local_irq_disable, and sched_yield() needs to undo that.

22 years ago[PATCH] Fix page double-freeing race
Andrew Morton [Fri, 14 May 2004 12:40:34 +0000 (05:40 -0700)]
[PATCH] Fix page double-freeing race

This has been there for nearly two years.  See bugzilla #1403

vmscan.c does, in two places:

spin_lock(zone->lru_lock)
page = lru_to_page(&zone->inactive_list);
if (page_count(page) == 0) {
/* erk, it's being freed by __page_cache_release() or
 * release_pages()
 */
put_it_back_on_the_lru();

} else {

--> window 1 <--

page_cache_get(page);
put_in_on_private_list();
}
spin_unlock(zone->lru_lock)

use_the_private_list();

page_cache_release(page);

whereas __page_cache_release() and release_pages() do:

if (put_page_testzero(page)) {

--> window 2 <--

spin_lock(lru->lock);
if (page_count(page) == 0) {
remove_it_from_the_lru();
really_free_the_page()
}
spin_unlock(zone->lru_lock)
}

The race occurs if the vmscan.c path sees page_count()==1 and then the
page_cache_release() path happens in that few-instruction "window 1" before
vmscan's page_cache_get().

The page_cache_release() path does put_page_testzero(), which returns true.
Then this CPU takes an interrupt...

The vmscan.c path then does page_cache_get(), taking the refcount to one.
Then it uses the page and does page_cache_release(), taking the refcount to
zero and the page is really freed.

Now, the CPU running page_cache_release() returns from the interrupt, takes
the LRU lock, sees the page still has a refcount of zero and frees it again.
Boom.

The patch fixes this by closing "window 1".  We provide a
"get_page_testone()" which grabs a ref on the page and returns true if the
refcount was previously zero.  If that happens the vmscan.c code simply drops
the page's refcount again and leaves the page on the LRU.

All this happens under the zone->lru_lock, which is also taken by
__page_cache_release() and release_pages(), so the vmscan code knows that the
page has not been returned to the page allocator yet.

In terms of implementation, the page counts are now offset by one: a free page
has page->_count of -1.  This is so that we can use atomic_add_negative() and
atomic_inc_and_test() to provide put_page_testzero() and get_page_testone().

The macros hide all of this so the public interpretation of page_count() and
set_page_count() remains unaltered.

The compiler can usually constant-fold the offsetting of page->count.  This
patch increases an x86 SMP kernel's text by 32 bytes.

The patch renames page->count to page->_count to break callers who aren't
using the macros.

This patch requires that the architecture implement atomic_add_negative().  It
is currently present on

arm
arm26
i386
ia64
mips
ppc
s390
v850
x86_64

ppc implements this as

#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)

and atomic_add_return() is implemented on

alpha
cris
h8300
ia64
m68knommu
mips
parisc
ppc
ppc
ppc64
s390
sh
sparc
v850

so we're looking pretty good.

22 years ago[PATCH] sparc64: implement atomic_add_negative()
Andrew Morton [Fri, 14 May 2004 12:40:23 +0000 (05:40 -0700)]
[PATCH] sparc64: implement atomic_add_negative()

22 years ago[PATCH] ia64 atomic_inc_and_test fix
Andrew Morton [Fri, 14 May 2004 12:40:13 +0000 (05:40 -0700)]
[PATCH] ia64 atomic_inc_and_test fix

From: David Mosberger <davidm@napali.hpl.hp.com>

22 years ago[PATCH] alpha: atomic_inc_and_test()
Andrew Morton [Fri, 14 May 2004 12:40:02 +0000 (05:40 -0700)]
[PATCH] alpha: atomic_inc_and_test()

From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

It seems atomic_inc_and_test() is missing on alpha.

22 years ago[PATCH] Implement atomic_inc_and_test() on various architectures
Andrew Morton [Fri, 14 May 2004 12:39:51 +0000 (05:39 -0700)]
[PATCH] Implement atomic_inc_and_test() on various architectures

It's easy to do when the arch provides atomic_inc_return().

22 years ago[PATCH] Implement atomic_add_negative() on various architectures
Andrew Morton [Fri, 14 May 2004 12:39:40 +0000 (05:39 -0700)]
[PATCH] Implement atomic_add_negative() on various architectures

Lots of architectures have atomic_add_return() and no atomic_add_negative().

We can implement the latter in terms of the former.

22 years ago[PATCH] Make users of page->count use the provided macros
Andrew Morton [Fri, 14 May 2004 12:39:29 +0000 (05:39 -0700)]
[PATCH] Make users of page->count use the provided macros

I'm about to change the meaning (and name) of page->count.  Go through and fix
up all those places which are open-coding references to it.

22 years agoMerge redhat.com:/spare/repo/linux-2.6
Jeff Garzik [Fri, 14 May 2004 16:48:09 +0000 (12:48 -0400)]
Merge redhat.com:/spare/repo/linux-2.6
into redhat.com:/spare/repo/net-drivers-2.6

22 years agoMerge bk://kernel.bkbits.net/gregkh/linux/i2c-2.6
Linus Torvalds [Fri, 14 May 2004 09:46:22 +0000 (02:46 -0700)]
Merge bk://kernel.bkbits.net/gregkh/linux/i2c-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years agoMerge bk://kernel.bkbits.net/gregkh/linux/driver-2.6
Linus Torvalds [Fri, 14 May 2004 09:26:40 +0000 (02:26 -0700)]
Merge bk://kernel.bkbits.net/gregkh/linux/driver-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years agoMerge bk://kernel.bkbits.net/gregkh/linux/usb-2.6
Linus Torvalds [Fri, 14 May 2004 08:50:45 +0000 (01:50 -0700)]
Merge bk://kernel.bkbits.net/gregkh/linux/usb-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years agoMerge kroah.com:/home/greg/linux/BK/bleed-2.6
Greg Kroah-Hartman [Fri, 14 May 2004 08:44:08 +0000 (01:44 -0700)]
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/driver-2.6

22 years agoMerge kroah.com:/home/greg/linux/BK/bleed-2.6
Greg Kroah-Hartman [Fri, 14 May 2004 08:21:10 +0000 (01:21 -0700)]
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/i2c-2.6

22 years ago[PATCH] I2C: Missed ixp42x -> ixp4xx conversion
Deepak Saxena [Fri, 14 May 2004 08:00:02 +0000 (01:00 -0700)]
[PATCH] I2C: Missed ixp42x -> ixp4xx conversion

Forgot to include this with my original patch a few weeks ago...

22 years ago[PATCH] I2C: "probe" module param broken for it87 in Linux 2.6.6
Bjørn Mork [Fri, 14 May 2004 07:59:26 +0000 (00:59 -0700)]
[PATCH] I2C: "probe" module param broken for it87 in Linux 2.6.6

Jean Delvare <khali@linux-fr.org> writes:
> So I'd suggest that you simply use the standard exit sequence in the
> it87 driver (the second one in your current patch). A patch for the 2.4
> driver would be appreciated as well.

OK.  I've attached a new version of the patch against linux-2.6.6.
I'll send a patch against current lm_sensors CVS removing the extra
exit command in a separate mail.

Greg KH <greg@kroah.com> writes:
> On Wed, May 12, 2004 at 04:38:03PM +0200, Bj?rn Mork wrote:
>> + if (!it87_find(&addr)) {
>> + printk("it87.o: new ISA address: 0x%04x\n", addr);
>
> That printk is wrong (no KERN_ level, or dev_printk() style use).
> Please fix it in your next revision of this patch.

Errh, I just added it to document my sloppyness.  It was never meant
to be in the patch I sent you.  Sorry.  Removed in the attached patch.
The style of these drivers seem to be "just working, making no noise"
so I assume informational printk's are unwanted.

22 years ago[PATCH] I2C: ICH6/6300ESB i2c support
Jason D. Gaston [Fri, 14 May 2004 07:58:42 +0000 (00:58 -0700)]
[PATCH] I2C: ICH6/6300ESB i2c support

This patch adds DID support for ICH6 and 6300ESB to i2c-i801.c(SMBus).
In order to add this support I needed to patch pci_ids.h with the SMBus
DID's.  To keep things orginized I renumbered the ICH6 and ESB entries
in pci_ids.h.  I then patched the piix IDE and i810 audio drivers to
reflect the updated #define's.  I also removed an error from irq.c;
there was a reference to a 6300ESB DID that does not exist.

22 years agoUSB: convert visor to use module_param()
Greg Kroah-Hartman [Fri, 14 May 2004 07:49:39 +0000 (00:49 -0700)]
USB: convert visor to use module_param()

22 years agoUSB: convert pl2303 to use module_param()
Greg Kroah-Hartman [Fri, 14 May 2004 07:47:04 +0000 (00:47 -0700)]
USB: convert pl2303 to use module_param()

22 years agoUSB: change usbserial core to use module_param()
Greg Kroah-Hartman [Fri, 14 May 2004 07:46:03 +0000 (00:46 -0700)]
USB: change usbserial core to use module_param()

22 years agoMerge bk://linux-acpi.bkbits.net/linux-acpi-release-2.6.6
Linus Torvalds [Fri, 14 May 2004 07:00:10 +0000 (00:00 -0700)]
Merge bk://linux-acpi.bkbits.net/linux-acpi-release-2.6.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux

22 years ago[PATCH] USB: hcd-pci suspend tweak
David Brownell [Fri, 14 May 2004 05:19:20 +0000 (22:19 -0700)]
[PATCH] USB: hcd-pci suspend tweak

I needed this to get an APM + UHCI config to behave on resume.
Applies against your BK of last night ... OHCI and EHCI do
some of this manually, they could be simplified later.

22 years ago[PATCH] sysfs_rename_dir-cleanup
Maneesh Soni [Fri, 14 May 2004 05:13:00 +0000 (22:13 -0700)]
[PATCH] sysfs_rename_dir-cleanup

o The following patch cleans up sysfs_rename_dir(). It now checks the
  return code of kobject_set_name() and propagates the error code to its
  callers. Because of this there are changes in the following two APIs. Both
  return int instead of void.

int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
int kobject_rename(struct kobject * kobj, char *new_name)

22 years ago[PATCH] add ibmasm driver warning message
Max Asbock [Fri, 14 May 2004 05:12:11 +0000 (22:12 -0700)]
[PATCH] add ibmasm driver warning message

[note, I changed this a bit to be nicer on the system log, greg k-h]

22 years ago[PATCH] USB: ohci resume fix
David Brownell [Fri, 14 May 2004 04:57:21 +0000 (21:57 -0700)]
[PATCH] USB: ohci resume fix

Prakash K. Cheemplavam wrote:
> David Brownell wrote:
>
>>> There appear lines like
>>>
>>> usb usb2: string descriptor 0 read error: -108
>>>
>>> bug or feature? They weren't there with 2.6.6-mm1. I have no usb2.0
>>> stuff to actually test. My usb1 stuff seems to work though.
>>
>> Bug; minor, since the only real symptom seems to be messages like
>> that.  Ignore them for now, I'll make a patch soonish.
>
> Ok, good. Thanks for the explanation of what is going on, though I don't
> can make too much out of it. ;-)

The short version is:  it's missing this patch.

22 years ago[PATCH] USB: compile fix for usbfs snooping
Duncan Sands [Fri, 14 May 2004 04:52:44 +0000 (21:52 -0700)]
[PATCH] USB: compile fix for usbfs snooping

22 years agoUSB: remove get_usb_serial() as it's pretty much unneeded
Greg Kroah-Hartman [Fri, 14 May 2004 04:49:41 +0000 (21:49 -0700)]
USB: remove get_usb_serial() as it's pretty much unneeded

It also could hide real bugs, and that's not good.  And the name
implies that a reference is grabbed, and that's not true at all.

22 years agoUSB: remove serial_paranoia_check() function
Greg Kroah-Hartman [Fri, 14 May 2004 03:54:51 +0000 (20:54 -0700)]
USB: remove serial_paranoia_check() function

If this is hiding real problems, we need to find them.

22 years agoUSB: removed port_paranoia_check() call for usb serial drivers.
Greg Kroah-Hartman [Fri, 14 May 2004 03:53:59 +0000 (20:53 -0700)]
USB: removed port_paranoia_check() call for usb serial drivers.

Pretty useless stuff.  If this was hiding anything real, we need to find out.

22 years agoUSB: remove magic number field from struct usb_serial as it's pretty useless.
Greg Kroah-Hartman [Fri, 14 May 2004 03:52:34 +0000 (20:52 -0700)]
USB: remove magic number field from struct usb_serial as it's pretty useless.

22 years agoUSB: remove magic number field from usb_serial_port as it's pretty useless.
Greg Kroah-Hartman [Fri, 14 May 2004 03:50:40 +0000 (20:50 -0700)]
USB: remove magic number field from usb_serial_port as it's pretty useless.

22 years ago[PATCH] USB: usbhid calls itself "hid"
David Brownell [Thu, 13 May 2004 09:04:18 +0000 (02:04 -0700)]
[PATCH] USB: usbhid calls itself "hid"

22 years ago[PATCH] USB: Merge support for Keyspan UPR-112 USB serial adapter from 2.4 to 2.6
Tony Lindgren [Thu, 13 May 2004 09:03:50 +0000 (02:03 -0700)]
[PATCH] USB: Merge support for Keyspan UPR-112 USB serial adapter from 2.4 to 2.6

Following patch merges the support for Keyspan UPR-112 USB serial adapter
from 2.4 to 2.6.

22 years agoUSB: add snooping capability to usbfs for control messages.
Greg Kroah-Hartman [Thu, 13 May 2004 08:40:30 +0000 (01:40 -0700)]
USB: add snooping capability to usbfs for control messages.

Also fix up some of the other printk() calls to be dev_* calls.

22 years ago[PATCH] USB: fix ohci-hcd build error
Andrew Morton [Thu, 13 May 2004 07:15:01 +0000 (00:15 -0700)]
[PATCH] USB: fix ohci-hcd build error

"Matt H." <lkml@lpbproductions.com> wrote:
>
> Just attempted to compile 2.6.6-mm2 and got this error
>
>    CC [M]  drivers/usb/core/driverfs.o
>    CC [M]  drivers/usb/core/hcd-pci.o
>    LD [M]  drivers/usb/core/usbcore.o
>    LD      drivers/usb/host/built-in.o
>    CC [M]  drivers/usb/host/ehci-hcd.o
>    CC [M]  drivers/usb/host/ohci-hcd.o
>  In file included from drivers/usb/host/ohci-hcd.c:129:
>  drivers/usb/host/ohci-hub.c: In function `ohci_rh_resume':
>  drivers/usb/host/ohci-hub.c:313: error: `hcd' undeclared (first use in this
>  function)

hm, not sure what's happened there...

22 years ago[PATCH] USB: Don't delete interfaces until all are unbound
Alan Stern [Thu, 13 May 2004 07:14:34 +0000 (00:14 -0700)]
[PATCH] USB: Don't delete interfaces until all are unbound

On Thu, 13 May 2004, Duncan Sands wrote:

> No, but the pointer for another (previous) interface may just have been
> set to NULL, causing an Oops when usb_ifnum_to_if loops over all
> interfaces.

Of course!  I trust you won't mind me changing your suggested fix
slightly.  This should do an equally good job of repairing things, and it
will prevent other possible invalid references as well.

22 years ago[PATCH] USB: Patch to remove interface indices from devio.c
Duncan Sands [Thu, 13 May 2004 07:14:05 +0000 (00:14 -0700)]
[PATCH] USB: Patch to remove interface indices from devio.c

> I went ahead and created a patch to change all the places where devio.c
> uses an interface index.  Now it always uses just the interface number.
> Does this look all right to you?  I don't have a convenient way to test
> it.

Hi Alan, thanks for doing this.  It looks and works OK.  I added some name
changes: all struct usb_interface pointers are now called intf; and, when
reasonable, variables holding interface numbers are now all called ifnum.
This drowns your original changes in a sea of churning names, I hope you
don't mind.

22 years ago[PATCH] USB: missing probe() diagnostics for CDC Ethernet
David Brownell [Thu, 13 May 2004 07:13:38 +0000 (00:13 -0700)]
[PATCH] USB: missing probe() diagnostics for CDC Ethernet

This patch should help correct the "missing diagnostics with
CONFIG_USB_DEBUG during CDC Ethernet probe()" issue.  Some
folk are having problems with firmware that doesn't respond
properly to descriptor fetches -- which is unnecessarily
confusing because the diagnostics aren't being printed.

22 years agoMerge kroah.com:/home/greg/linux/BK/bleed-2.6
Greg Kroah-Hartman [Wed, 12 May 2004 03:06:23 +0000 (20:06 -0700)]
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/usb-2.6

22 years ago[PATCH] kobject/sysfs race fix
Maneesh Soni [Tue, 11 May 2004 09:43:50 +0000 (02:43 -0700)]
[PATCH] kobject/sysfs race fix

The following patch fixes the race involved between unregistering a kobject
and simultaneously opeing a corresponding attribute file in sysfs.

Ideally sysfs should take a ref.  to the kobject as long as it has dentries
referring to the kobjects, but because of current limitations in
module/kobject ref counting, sysfs's pinning of kobject leads to
hang/delays in rmmod of certain modules.  The patch checks for unhashed
dentries in check_perm() while opening a sysfs file.  If the dentry is
still hashed then it goes ahead and takes the ref to kobject.  This done
under the per dentry lock.  It does this in the inline routine
sysfs_get_kobject(dentry).

22 years ago[PATCH] fix dev_printk to work even in the absence of an attached driver
James Bottomley [Tue, 11 May 2004 09:35:42 +0000 (02:35 -0700)]
[PATCH] fix dev_printk to work even in the absence of an attached driver

22 years ago[PATCH] kobject_set_name - error handling
Maneesh Soni [Tue, 11 May 2004 09:31:46 +0000 (02:31 -0700)]
[PATCH] kobject_set_name - error handling

1) kobject_set_name-cleanup-01.patch

This patch corrects the following by checking the reutrn code from
kobject_set_name().

bus_add_driver()
bus_register()
sys_dev_register()

o The following patch cleansup the kobject_set_name() users. Basically checking
  return code from kobject_set_name(). There can be error returns like -ENOMEM
  or -EFAULT from kobject_set_name() if the name length exceeds KOBJ_NAME_LEN.

22 years ago[PATCH] USB: cosmetic fixes for cdc-acm
Colin Leroy [Tue, 11 May 2004 09:19:59 +0000 (02:19 -0700)]
[PATCH] USB: cosmetic fixes for cdc-acm

22 years ago[PATCH] USB: OHCI root hub suspend/resume/wakeup
David Brownell [Tue, 11 May 2004 09:03:07 +0000 (02:03 -0700)]
[PATCH] USB: OHCI root hub suspend/resume/wakeup

This patch goes on top of the previous two, and the hcd-0506 patch:

  - Moves root hub suspend/resume code out of PCI-specific bus glue
    into generic hub code.  That way it's easy to re-use it even
    for non-PCI implementations like SA1111, OMAP, and LH7A404.
    (Plus, given CONFIG_USB_SUSPEND, it can be invoked with sysfs.)

  - Root hub suspend is a lot more careful, as is root hub resume.
    Pending transactions are now shut down more consistently; and
    more registers are re-initialized on resume.

  - The PCI bus glue is now left with truly generic PCI stuff, plus
    some PMAC-specific stuff (which doesn't include irq disabling
    any more, hcd-0506 moves that up a level in the stack).

  - Remote wakeup support is basically working for the root hub.
    (given CONFIG_USB_SUSPEND to suspend devices and enable it).

  - Idle HCs will now automatically suspend themselves, and resume
    as necessary.  This saves a certain amount of power on most
    systems, and matches what UHCI has been doing for a while.

The large size of this patch is mostly because of moving that
root hub suspend/resume code out of the PCI-specific glue.

22 years ago[PATCH] USB: khubd turns port power back on after reset
David Brownell [Tue, 11 May 2004 08:57:51 +0000 (01:57 -0700)]
[PATCH] USB: khubd turns port power back on after reset

This goes with the OHCI anti-deadlock patch, and is what
ensures that when a root hub loses power during suspend,
khubd can turn port power back on so devices can enumerate.

22 years ago[PATCH] USB: OHCI cleanups
David Brownell [Tue, 11 May 2004 08:57:21 +0000 (01:57 -0700)]
[PATCH] USB: OHCI cleanups

This splits out a few obvious fixes, to help shrink a PM patch:

  - when the HC is quiescing, don't schedule any more EDs
    or re-activate any after unlink completion.

  - when the HC is suspended, don't access registers through
    sysfs either.

  - simplify locking and call for donelist processing

22 years ago[PATCH] USB: OHCI resume/reset stops deadlocking in PM code
David Brownell [Tue, 11 May 2004 08:56:50 +0000 (01:56 -0700)]
[PATCH] USB: OHCI resume/reset stops deadlocking in PM code

System-wide PM resume now happily deadlocks if one of the
resuming devices tries to remove devices which vanished
during the suspend(*).  IMO that's unreasonable both
because devices can/do vanish, and because 2.4 didn't
deadlock in those cases; but no patch to fix that has been
merged.  The result is that ever since merging the "new" PM
code, some OHCI-based systems deadlock on resume.

So this patch handles the "lost power during resume" case
differently:  it doesn't disconnect the root hub (or its
children) directly.  Instead, it does part of that work
immediately, and defers the rest to khubd:

  - add a "pending" list for live urbs, and use it after reset
    to abort pending URBs (and reclaim "live" EDs/TDs)
  - immediately mark all devices NOTATTACHED, so any operations
    on the devices before khubd handles the disconnects, including
    resume() callbacks, will fail
  - kick root hub so it can do the cleanup

It also handles "fminterval" init/reinit a bit better, mostly
to work better in some remote wakeup scenarios addressed in
later patches:

   - save any initial value the boot firmware provided
   - use it during initialization (and eventually, remote wakeup)

Other changes:

  - use better jiffies calculation for scheduled delays
  - the allocator does more of the one-time initialization
  - initialize hcd.can_wakeup according to boot firmware
  - move some inlines to the header
  - minor cleanups

(*) http://marc.theaimsgroup.com/?l=linux-kernel&m=106606272103414&w=2
     reported against 2.6.0-test7.