]> git.neil.brown.name Git - history.git/log
history.git
23 years agoMerge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
Patrick Mochel [Tue, 29 Oct 2002 15:14:59 +0000 (07:14 -0800)]
Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-kobject

23 years ago[PATCH] remove double-init in /proc/ksyms
Randy Dunlap [Tue, 29 Oct 2002 13:33:14 +0000 (05:33 -0800)]
[PATCH] remove double-init in /proc/ksyms

This removes a small thinko (2 of: n = *pos) in kernel/module.c's
s_start() function.

23 years ago[PATCH] more shm/loop updates
Alexander Viro [Tue, 29 Oct 2002 13:31:57 +0000 (05:31 -0800)]
[PATCH] more shm/loop updates

Ok, with this simple fix loop builds and loop works no worse than the
old shm/loop approach (better - it does boot).

However, both 2.4.44+ and this animal have the same and rather odd
breakage in loop-over-device.  Loop-over-file works fine, but loop over
device gives random crap on reads.  And no, it's not a problem with
underlying device itself - something happens in loop.c.

I'm going down right now, so I'll be back in several hours and will try
to debug it.  Hopefully by the morning I'll have a fix.

23 years ago[PATCH] fix oprofile multiple counters
John Levon [Tue, 29 Oct 2002 13:16:02 +0000 (05:16 -0800)]
[PATCH] fix oprofile multiple counters

This ensures we deal properly with multiple perfctr overflow interrupts
under high load.

23 years ago[PATCH] add oprofile to MAINTAINERS
John Levon [Tue, 29 Oct 2002 13:15:56 +0000 (05:15 -0800)]
[PATCH] add oprofile to MAINTAINERS

23 years ago[PATCH] factor common GCC options check
Brian Gerst [Tue, 29 Oct 2002 13:14:58 +0000 (05:14 -0800)]
[PATCH] factor common GCC options check

Make the test for supported GCC options into a macro, and add new checks
for -march={winchip-c6,winchip2,c3}.

23 years ago[PATCH] Get rid of check_resource() before it becomes a problem
Rusty Russell [Tue, 29 Oct 2002 13:14:51 +0000 (05:14 -0800)]
[PATCH] Get rid of check_resource() before it becomes a problem

The new resource interface foolishly replicated the (obsolete,
racy) spirit of the check_region call as check_resource.  You
should use request_resource/release_resource instead.

23 years ago[PATCH] compile fixes
Alexander Viro [Tue, 29 Oct 2002 13:01:30 +0000 (05:01 -0800)]
[PATCH] compile fixes

23 years ago[PATCH] sd.c major number off-by-one
Adam Kropelin [Tue, 29 Oct 2002 12:46:44 +0000 (04:46 -0800)]
[PATCH] sd.c major number off-by-one

Fix an off-by-one error in the simplified SD_MAJOR macro which not only
botches up the sd majors but also steals away the major used by my
favorite slow-than-dirt SCSI RAID controller: cpqarray. Please, can I
have it back?

23 years ago[PATCH] loop/shmfs fixes
Alexander Viro [Tue, 29 Oct 2002 11:33:07 +0000 (03:33 -0800)]
[PATCH] loop/shmfs fixes

 - add lo->lo_blocksize
 - kill lo_get_bs() - great name, but...
 - set ->lo_device only if we do have a block device
 - pull determination of ->lo_blocksize into both branches - bdev
   variant gets it from lo_device and file one uses ->i_blocksize.
 - switched the ioctl getting information about underlying object
   to lo->lo_device ? stat.rdev : stat.dev
 - i.e. st_rdev of underlying object if it's a device and st_dev - if it's
   a file.
 - reverted the bogosity in shmem.c

23 years agosysfs: marry api with struct kobject.
Patrick Mochel [Tue, 29 Oct 2002 10:26:01 +0000 (02:26 -0800)]
sysfs: marry api with struct kobject.

This works on obviating the need for a separate data type to describe a sysfs
directory (which was renamed from struct driver_dir_entry to struct sysfs_dir).

All sysfs creation and removal functions now take a struct kobject, instead
of a struct sysfs_dir. This kobject is embedded in ->d_fsdata of the directory.

sysfs_create_dir() takes only 1 parameter now: the object that we're creating
the directory for. The parent dentry is derived by looking at the object's
parent.

sysfs_create_file() takes the object as the first parameter, and the attribute
as the second, which makes more sense from an API perspective.

sysfs_remove_file() now takes an attribute as a second parameter, to be
consistent with the creation function.

sysfs_remove_link() is created, which is basically the old sysfs_remove_file().
(symlinks don't have an attribute associated with them; only a name, which was
prohibiting the previous change).

open() and close() look for a kobject now, and do refcounting directly on the
object. Because of that, we don't need the ->open() and ->close() callbacks
in struct sysfs_ops, so they've been removed.

read() and write() also now look for a kobject now.

The comments have been updated, too.

23 years ago[PATCH] Define domain_release handle for AUTH_UNIX domains
Neil Brown [Tue, 29 Oct 2002 10:00:40 +0000 (02:00 -0800)]
[PATCH] Define domain_release handle for AUTH_UNIX domains

23 years agosysfs: convert sysfs to use more functions from fs/libfs.c
Patrick Mochel [Tue, 29 Oct 2002 09:54:07 +0000 (01:54 -0800)]
sysfs: convert sysfs to use more functions from fs/libfs.c

23 years agointroduce struct kobject: simple, generic object for embedding in other structures.
Patrick Mochel [Tue, 29 Oct 2002 09:19:51 +0000 (01:19 -0800)]
introduce struct kobject: simple, generic object for embedding in other structures.

This is not meant to be fancy; just something simple for which we can
control the refcount and other common functionality using common code.

The basic operations for registration and reference count manipulation are
included.

23 years agoMerge http://gkernel.bkbits.net/misc-2.5
Linus Torvalds [Tue, 29 Oct 2002 09:16:47 +0000 (01:16 -0800)]
Merge http://gkernel.bkbits.net/misc-2.5
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years ago[IA32] Use -march=pentium{-mmx,3,4} in CFLAGS when available.
Jeff Garzik [Tue, 29 Oct 2002 14:55:44 +0000 (09:55 -0500)]
[IA32] Use -march=pentium{-mmx,3,4} in CFLAGS when available.

23 years agoMerge redhat.com:/home/jgarzik/repo/linus-2.5
Jeff Garzik [Tue, 29 Oct 2002 13:48:00 +0000 (08:48 -0500)]
Merge redhat.com:/home/jgarzik/repo/linus-2.5
into redhat.com:/home/jgarzik/repo/misc-2.5

23 years ago[PATCH] tmpfs: support loopback
Andrew Morton [Tue, 29 Oct 2002 08:55:08 +0000 (00:55 -0800)]
[PATCH] tmpfs: support loopback

Patch from Hugh Dickins

Added shmem_readpage and shmem_prepare_write so tmpfs files can be used
by the loop driver (together with simple_commit_write).  shmem_getpage
extended to accept file page passed in, which may have to be copied
over from swap page.

Use bdget and sb_set_blocksize so loop can see our preferred blocksize
PAGE_CACHE_SIZE.  Use copy_highpage, removed from highmem.h in 2.4.17:
restore it but with kmap_atomics.  Restore (a simple) copy_page to
asm-sparc64/page.h, which alone of all arches discarded it.

23 years ago[PATCH] tmpfs: shmem_getpage missing flush_dcache_page
Andrew Morton [Tue, 29 Oct 2002 08:54:57 +0000 (00:54 -0800)]
[PATCH] tmpfs: shmem_getpage missing flush_dcache_page

Patch from Hugh Dickins

From Matthew Wilcox <willy@debian.org>: shmem_getpage must
flush_dcache_page after allocating and clearing a new page.

23 years ago[PATCH] tmpfs: shmem_file_write update
Andrew Morton [Tue, 29 Oct 2002 08:54:47 +0000 (00:54 -0800)]
[PATCH] tmpfs: shmem_file_write update

Patch from Hugh Dickins

Checked shmem_file_write against recent filemap source, and against
2.4 and 2.4-ac: folded in missing fixes, mostly related to far file
positions.  Plus the new kmap_atomic copying technique.  But for now,
as before, no mark_page_accessed or SetPageReferenced in shmem.c: add
those, or whatever, later on when akpm has reviewed usage elsewhere.

23 years ago[PATCH] tmpfs: shmem_file_sendfile
Andrew Morton [Tue, 29 Oct 2002 08:54:37 +0000 (00:54 -0800)]
[PATCH] tmpfs: shmem_file_sendfile

Patch from Hugh Dickins

Added shmem_file_sendfile to allow sendfile from tmpfs.  Checked
do_shmem_file_read and shmem_file_read against filemap equivalents
to add in any recent fixes (-EINVAL when count < 0 was missing).

23 years ago[PATCH] tmpfs: shmem fs cleanup
Andrew Morton [Tue, 29 Oct 2002 08:54:27 +0000 (00:54 -0800)]
[PATCH] tmpfs: shmem fs cleanup

Patch from Hugh Dickins

Remove obsolete shmem_fs_type: we were in some doubt whether safe yet
to do so, then found 2.5.4 typo changed it from 2.4's "shm" to "shmem"
ever since: nobody complained, delete it - we're "tmpfs" since 2.4.4.
Use libfs' simple_empty and simple_sync_file instead of homegrown.
Remove exit_shmem_fs, it fools people that this might be a module.
Allow for faint possibility that shm_mnt could not be initialized.

23 years ago[PATCH] tmpfs: shmem_getpage reading holes
Andrew Morton [Tue, 29 Oct 2002 08:54:17 +0000 (00:54 -0800)]
[PATCH] tmpfs: shmem_getpage reading holes

Patch from Hugh Dickins

Here I intended a patch to remove the unsatisfactory shmem_recalc_inode
(which tries to work out when vmscan has freed undirtied hole pages,
to relax its blocks-in-use limit; but can only do so per-inode when it
needs to be per-super).  I had hoped to use the releasepage method, but
it looks like it can't quite be bent to this task, the page might still
be rebusied after release.  2.4-ac uses a removepage method dedicated to
this, but I'm reluctant to ask for such a minor address_space_operation.

So, leave shmem_recalc_inode as is, but avoid the issue as much as
possible, by letting shmem_getpage use the empty_zero_page instead of
allocating when a hole is read (but this cannot be done when it's being
mapped, nowadays the nopage doesn't know if page will be copied or not).
Whereupon shmem_getpage(,,,SGP_READ) can do partial trunc's holdpage.

23 years ago[PATCH] tmpfs: shmem_getpage beyond eof
Andrew Morton [Tue, 29 Oct 2002 08:54:07 +0000 (00:54 -0800)]
[PATCH] tmpfs: shmem_getpage beyond eof

Patch from Hugh Dickins

The last set of tmpfs patches left shmem_getpage with an inadequate
next_index test to guard against races with truncation.  Now remove
that check and settle the issue with checks against i_size within
shmem_swp_alloc, which needs to know whether reading or writing.

23 years ago[PATCH] tmpfs: shmem_getpage unlock_page
Andrew Morton [Tue, 29 Oct 2002 08:53:57 +0000 (00:53 -0800)]
[PATCH] tmpfs: shmem_getpage unlock_page

Patch from Hugh Dickins

shmem_getpage does need to lock its page (to secure it against
shmem_writepage), but it's easier for its callers if it unlocks
before returning.  The only caller who appeared to be using the
page lock was shmem_file_write, but it wasn't actually protecting
against anything - i_sem prevents concurrent writes and truncates,
and do_shmem_file_read was dropping the lock before copying anyway.

23 years ago[PATCH] removal of root_dev_names[]
Alexander Viro [Tue, 29 Oct 2002 08:47:58 +0000 (00:47 -0800)]
[PATCH] removal of root_dev_names[]

 - name_to_kdev_t() turned into name_to_dev_t(), callers updated.
 - table of names is gone, we use driverfs instead.

 - root name is converted to dev_t only at prepare_namespace() time - we
   use to do it in setup and we need it after driver initialization.  So
   setup only stores the root name and leaves the work to
   prepare_namespace().

 - disk names for rd and cm206 changed to match the old behaviour of
   root= parser: ramdisks have ram<n> in ->disk_name now (instead of
   rd<n>) and cm206 - cm206cd (instead of cm206).

23 years ago[PATCH] swsusp updates
Pavel Machek [Tue, 29 Oct 2002 08:44:38 +0000 (00:44 -0800)]
[PATCH] swsusp updates

This uses better constraints that do not go through the register
unneccessarily.

23 years ago[PATCH] swsusp -- small fixes
Pavel Machek [Tue, 29 Oct 2002 08:44:28 +0000 (00:44 -0800)]
[PATCH] swsusp -- small fixes

Do not oops when no swapfile is available and make it compile on
DISCONTIGMEM machines.

23 years ago[PATCH] i386 __verify_write fixes
Brian Gerst [Tue, 29 Oct 2002 08:34:07 +0000 (00:34 -0800)]
[PATCH] i386 __verify_write fixes

This patch does a few cleanups/fixes with __verify_write:
 - Only compile it when needed.
 - Move test for KERNEL_DS out of line.
 - The mmap semaphore is needed to access the vma list.
 - Use fixmap for the WP test.
 - Removes an obsolete comment in fixmap.h

23 years ago[PATCH] remove __verify_write from sh arch
Brian Gerst [Tue, 29 Oct 2002 08:33:55 +0000 (00:33 -0800)]
[PATCH] remove __verify_write from sh arch

It was copied from i386 and is unused.

23 years ago[PATCH] fix xfs build after lvm removal
Christoph Hellwig [Tue, 29 Oct 2002 08:30:26 +0000 (00:30 -0800)]
[PATCH] fix xfs build after lvm removal

23 years ago[PATCH] make x86 ptrace use init_fpu()
Brian Gerst [Tue, 29 Oct 2002 08:30:13 +0000 (00:30 -0800)]
[PATCH] make x86 ptrace use init_fpu()

This fixes PTRACE_GETFPREGS to initilize the fpu struct correctly on
cpus with fxsr, as well as removing redundant code.

23 years ago[PATCH] gendisk fixes
Alexander Viro [Tue, 29 Oct 2002 05:39:10 +0000 (21:39 -0800)]
[PATCH] gendisk fixes

 - fixes an idiocy with floppy_find() et.al. - they forgot to set
   *part to 0.  As the result, open() on anything other than fd0 had
   lead to interesting effects...

 - fixes off-by-1 in set_disk_ro().

23 years agoFix up horribly wrong test in new copy-to-user()
Linus Torvalds [Tue, 29 Oct 2002 05:10:56 +0000 (21:10 -0800)]
Fix up horribly wrong test in new copy-to-user()
implementation. The optimized versions only work
for large areas, make sure we don't use them for
anything else.

23 years agoFix ACPI frequency states to not play games with the
Linus Torvalds [Tue, 29 Oct 2002 04:22:44 +0000 (20:22 -0800)]
Fix ACPI frequency states to not play games with the
configuration system, and instead just cleanly show
the dependency.

23 years ago[PATCH] sanitize intel movsl selection
Christoph Hellwig [Tue, 29 Oct 2002 04:21:41 +0000 (20:21 -0800)]
[PATCH] sanitize intel movsl selection

The ifdef <actual cpu selection> is very bad style, we usually introduce
feature CONFIG_ options in config.in instead.

23 years agoMerge bk://linuxusb.bkbits.net/pci_hp-2.5
Linus Torvalds [Tue, 29 Oct 2002 04:20:02 +0000 (20:20 -0800)]
Merge bk://linuxusb.bkbits.net/pci_hp-2.5
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years agoMerge bk://linuxusb.bkbits.net/pnp-2.5
Linus Torvalds [Tue, 29 Oct 2002 04:15:24 +0000 (20:15 -0800)]
Merge bk://linuxusb.bkbits.net/pnp-2.5
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux

23 years agoMerge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5
Greg Kroah-Hartman [Tue, 29 Oct 2002 02:07:14 +0000 (18:07 -0800)]
Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5
into kroah.com:/home/greg/linux/BK/pci_hp-2.5

23 years agoMerge home.transmeta.com:/home/torvalds/v2.5/hirofumi
Linus Torvalds [Tue, 29 Oct 2002 01:50:24 +0000 (17:50 -0800)]
Merge home.transmeta.com:/home/torvalds/v2.5/hirofumi
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years ago[PATCH] small cleanup of fat (3/3)
Hirofumi Ogawa [Tue, 29 Oct 2002 01:48:44 +0000 (17:48 -0800)]
[PATCH] small cleanup of fat  (3/3)

 - cleanup
 - remove unneeded mark_inode_dirty() in fat_extend_dir()

23 years ago[PATCH] remove the fat_cvf stuff (2/3)
Hirofumi Ogawa [Tue, 29 Oct 2002 01:48:40 +0000 (17:48 -0800)]
[PATCH] remove the fat_cvf stuff (2/3)

This removes fat_cvf stuff, and adds printk() level. As far as I
know, all the challengers gave up porting of fat_cvf.
(This patch from Christoph Hellwig)

23 years ago[PATCH] remove the conv option of fat (1/3)
Hirofumi Ogawa [Tue, 29 Oct 2002 01:48:35 +0000 (17:48 -0800)]
[PATCH] remove the conv option of fat (1/3)

This removes the conv option. This option does nothing, now.
(This patch from RenĂ© Scharfe)

23 years agoMerge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5
Greg Kroah-Hartman [Tue, 29 Oct 2002 01:45:25 +0000 (17:45 -0800)]
Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5
into kroah.com:/home/greg/linux/BK/pnp-2.5

23 years ago[PATCH] overcommit-accounting doc fix
Robert Love [Tue, 29 Oct 2002 01:17:00 +0000 (17:17 -0800)]
[PATCH] overcommit-accounting doc fix

23 years agoMerge http://gkernel.bkbits.net/misc-2.5
Linus Torvalds [Tue, 29 Oct 2002 00:59:58 +0000 (16:59 -0800)]
Merge http://gkernel.bkbits.net/misc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge http://gkernel.bkbits.net/net-drivers-2.5
Linus Torvalds [Tue, 29 Oct 2002 00:59:13 +0000 (16:59 -0800)]
Merge http://gkernel.bkbits.net/net-drivers-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge http://jfs.bkbits.net/linux-2.5
Linus Torvalds [Tue, 29 Oct 2002 00:53:59 +0000 (16:53 -0800)]
Merge http://jfs.bkbits.net/linux-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge master.kernel.org:/home/davem/BK/net-2.5
Linus Torvalds [Tue, 29 Oct 2002 00:52:05 +0000 (16:52 -0800)]
Merge master.kernel.org:/home/davem/BK/net-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge master.kernel.org:/home/davem/BK/crypto-2.5
Linus Torvalds [Tue, 29 Oct 2002 00:50:59 +0000 (16:50 -0800)]
Merge master.kernel.org:/home/davem/BK/crypto-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge master.kernel.org:/home/davem/BK/sparc-2.5
Linus Torvalds [Tue, 29 Oct 2002 00:49:52 +0000 (16:49 -0800)]
Merge master.kernel.org:/home/davem/BK/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoMerge http://linux-sound.bkbits.net/linux-sound
Linus Torvalds [Tue, 29 Oct 2002 00:48:41 +0000 (16:48 -0800)]
Merge http://linux-sound.bkbits.net/linux-sound
into home.transmeta.com:/home/torvalds/v2.5/linux

23 years agoALSA update (0.9.0rc5)
Jaroslav Kysela [Tue, 29 Oct 2002 11:28:05 +0000 (12:28 +0100)]
ALSA update (0.9.0rc5)
  - ICE1712 - fixed Midiman M-audio Delta1010LT code
  - fixed typos in comments (es1938, intel8x0)
  - fixed quirks for Edirol UA-20 and UA-700 (USB driver)

23 years agoMerge http://linux.bkbits.net/linux-2.5
Jaroslav Kysela [Tue, 29 Oct 2002 10:37:03 +0000 (11:37 +0100)]
Merge http://linux.bkbits.net/linux-2.5
into suse.cz:/home/perex/bk/linux-sound/linux-sound

23 years ago[PATCH] arrange request fiels sanely
Jens Axboe [Tue, 29 Oct 2002 00:47:36 +0000 (16:47 -0800)]
[PATCH] arrange request fiels sanely

Right now, various fields in struct request are just scattered
throughout the struct. This makes for bad cache behaviour. This patch
puts commonly referenced together fiels in the same cache lines and also
removes the prefetches in deadline_merge(). The latter was actually
hurting performance here now that struct request is sanely laid out wrt
cache.

This is worth ~40% less deadline_merge() runtime during disk intensive
tests!

23 years ago[PATCH] remember to export scsi_command_size[]
Jens Axboe [Tue, 29 Oct 2002 00:47:30 +0000 (16:47 -0800)]
[PATCH] remember to export scsi_command_size[]

Move the export to block/scsi_ioctl.c as well.

23 years ago[PATCH] scsi_command_size[] only known when SCSI is enabled
Jens Axboe [Tue, 29 Oct 2002 00:47:25 +0000 (16:47 -0800)]
[PATCH] scsi_command_size[] only known when SCSI is enabled

block/scsi_ioctl.c uses scsi_command_size[] to get from opcode to length
of cdb, but that is only available with SCSI enabled. Move to
block/scsi_ioctl.c from scsi/scsi.c.

23 years ago[PATCH] bad scsi merge
Jens Axboe [Tue, 29 Oct 2002 00:47:20 +0000 (16:47 -0800)]
[PATCH] bad scsi merge

When someone deleted scsi_merge, they also killed the fixes I sent to
you earlier...

23 years ago[PATCH] much miscellany
Andrew Morton [Tue, 29 Oct 2002 00:34:19 +0000 (16:34 -0800)]
[PATCH] much miscellany

- add locking comments to do_mmap_pgoff(), filemap.c

- used unsigned long for cpu flags in aio.c (Andi)

- An x86-64 typo fix from Andi.

- Fix a tpyo

- Fix an unused var warning in the stack overflow check code

- mptlan compile fix (Rasmus Andersen)

- Update misleading comment in ia32 highmem.c

- "attempting to mount an ext3 fs on a stopped md/raid1 array caused a
   divide by 0 error in ext3_fill_super.  Fix duplicates check already
   in ext2." - Angus Sawyer <angus.sawyer@dsl.pipex.com>

- Someone changed the return type of inl() again! Fix up compiler
  warnings in 3c59x.c again.

23 years ago[PATCH] don't invalidate pagecache after direct-IO reads
Andrew Morton [Tue, 29 Oct 2002 00:23:09 +0000 (16:23 -0800)]
[PATCH] don't invalidate pagecache after direct-IO reads

There's no need to take down pagecache after performing direct-IO reads
from a file or a blockdevice.

And when using direct access to a blockdev which has a filesystem
mounted it creates unnecessary disturbance of filesystem activity.

23 years ago[PATCH] thread-aware oom-killer
Andrew Morton [Tue, 29 Oct 2002 00:23:03 +0000 (16:23 -0800)]
[PATCH] thread-aware oom-killer

From Ingo

- performance optimization: do not kill threads in the same thread group
  as the OOM-ing thread. (it's still necessery to scan over every thread
  though, as it's possible to have CLONE_VM threads in a different thread
  group - we do not want those to escape the OOM-kill.)

- to not let newly created child threads slip out of the group-kill. Note
  that the 2.4 kernel's OOM handler has the same problem, and it could be
  the reason why forkbombs occasionally slip out of the OOM kill.

23 years ago[PATCH] shrink_slab arith overflow fix
Andrew Morton [Tue, 29 Oct 2002 00:22:58 +0000 (16:22 -0800)]
[PATCH] shrink_slab arith overflow fix

shrink_slab() wants to calculate

nr_scanned_pages * seeks_per_object * entries_in_slab /
nr_lru_pages

entries_in_slab and nr_lru_pages can vary a lot.  There is a potential
for 32-bit overflows.

I spent ages trying to avoid corner cases which cause a significant
lack of precision while preserving some clarity.  Gave up and used
do_div().  The code is called rarely - at most once per 128 kbytes of
reclaim.

The patch adds a tweak to balance_pgdat() to reduce the call rate to
shrink_slab() in the case where the zone is just a little bit below
pages_high.

Also increase SHRINK_BATCH.  The things we're shrinking are typically a
few hundred bytes, and a batchcount of 128 gives us a minimum of ten
pages or so per shrinking callout.

23 years ago[PATCH] uninline the ia32 copy_*_user functions
Andrew Morton [Tue, 29 Oct 2002 00:22:53 +0000 (16:22 -0800)]
[PATCH] uninline the ia32 copy_*_user functions

There's more work to do on these, for well-aligned copies.
Arjan has some stuff for that.   First step on that path is
to clean the code up, get it uninlined and have a framework for
making per-CPU-type decisions.

23 years ago[PATCH] faster copy_*_user for bad alignments on intel ia32
Andrew Morton [Tue, 29 Oct 2002 00:22:49 +0000 (16:22 -0800)]
[PATCH] faster copy_*_user for bad alignments on intel ia32

This patch speeds up copy_*_user for some Intel ia32 processors.  It is
based on work by Mala Anand.

It is a good win.  Around 30% for all src/dest alignments except 32/32.

In this test a fully-cached one gigabyte file was read into an
8192-byte userspace buffer using read(fd, buf, 8192).  The alignment of
the user-side buffer was altered between runs.  This is a PIII.  Times
are in seconds.

User buffer 2.5.41 2.5.41+
patch++

0x804c000 4.373 4.343
0x804c001 10.024 6.401
0x804c002 10.002 6.347
0x804c003 10.013 6.328
0x804c004 10.105 6.273
0x804c005 10.184 6.323
0x804c006 10.179 6.322
0x804c007 10.185 6.319
0x804c008 9.725 6.347
0x804c009 9.780 6.275
0x804c00a 9.779 6.355
0x804c00b 9.778 6.350
0x804c00c 9.723 6.351
0x804c00d 9.790 6.307
0x804c00e 9.790 6.289
0x804c00f 9.785 6.294
0x804c010 9.727 6.277
0x804c011 9.779 6.251
0x804c012 9.783 6.246
0x804c013 9.786 6.245
0x804c014 9.772 6.063
0x804c015 9.919 6.237
0x804c016 9.920 6.234
0x804c017 9.918 6.237
0x804c018 9.846 6.372
0x804c019 10.060 6.294
0x804c01a 10.049 6.328
0x804c01b 10.041 6.337
0x804c01c 9.931 6.347
0x804c01d 10.013 6.273
0x804c01e 10.020 6.346
0x804c01f 10.016 6.356
0x804c020 4.442 4.366

So `rep;movsl' is slower at all non-cache-aligned offsets.

PII is using the PIII alignment.  I don't have a PII any more, but I do
recall that it demonstrated the same behaviour as the PIII.

The patch contains an enhancement (based on careful testing) from
Hirokazu Takahashi <taka@valinux.co.jp>.  In cases where source and
dest have the same alignment, but that aligment is poor, we do a short
copy of a few bytes to bring the two pointers onto a favourable
boundary and then do the big copy.

And also a bugfix from Hirokazu Takahashi.

As an added bonus, this patch decreases the kernel text by 28 kbytes.
22k of this in in .text and the rest in __ex_table.  I'm not really
sure why .text shrunk so much.

These copy routines have no special-case for constant-sized copies.  So
a lot of uaccess.h becomes dead code with this patch.  The next patch
which uninlines the copy_*_user functions cleans all that up and saves
an additional 5k.

23 years ago[PATCH] export nr_running and nr_iowait tasks in /proc
Andrew Morton [Tue, 29 Oct 2002 00:22:43 +0000 (16:22 -0800)]
[PATCH] export nr_running and nr_iowait tasks in /proc

From Rik.

"this trivial patch, against 2.5-current, exports nr_running and
 nr_iowait_tasks in /proc/stat.  With this patch in vmstat will no
 longer need to walk all the processes in the system just to determine
 the number of running and blocked processes."

23 years ago[PATCH] radix_tree_gang_lookup fix
Andrew Morton [Tue, 29 Oct 2002 00:22:39 +0000 (16:22 -0800)]
[PATCH] radix_tree_gang_lookup fix

When performing lookups against very sparse trees
radix_tree_gang_lookup fails to find nodes "far" to the right of the
start point.  Because it only understands sparseness in the leaf nodes,
not the intermediate nodes.

Nobody noticed this because all callers are incrementing the start
index as they walk the tree.

Change it to terminate the search when it really has inspected the last
possible node for the current tree's height.

23 years ago[PATCH] less buslocked operations in the page allocator
Andrew Morton [Tue, 29 Oct 2002 00:22:33 +0000 (16:22 -0800)]
[PATCH] less buslocked operations in the page allocator

Sort-of-but-not-really from High Dickins.

We're doing a lot of buslocked operations in the page allocator just
for debug.  Plus when they _do_ trigger, there are so many BUG_ONs in
there that it's rather hard to work out from user reports which one
actually triggered.

So redo all that and also print out some more useful info about the
page state before taking the machine out.

(And yes, we need to take the machine out.  Incorrect page handling in
there can cause file corruption).

23 years ago[PATCH] add a file_ra_state init function
Andrew Morton [Tue, 29 Oct 2002 00:22:28 +0000 (16:22 -0800)]
[PATCH] add a file_ra_state init function

Provide a function in core kernel to initialise a file_ra_state structure.

Perviously this was all taken care of by the fact that new struct
file's are all zeroed out.  But now a file_ra_state may be
independently allocated, and we don't want users of it to have to know
how to initialise it.

23 years ago[PATCH] permit direct IO with finer-than-fs-blocksize alignments
Andrew Morton [Tue, 29 Oct 2002 00:22:23 +0000 (16:22 -0800)]
[PATCH] permit direct IO with finer-than-fs-blocksize alignments

Mainly from Badari Pulavarty

Traditionally we have only supported O_DIRECT I/O at an alignment and
granularity which matches the underlying filesystem.  That typically
means that all IO must be 4k-aligned and a multiple of 4k in size.

Here, we relax that so that direct I/O happens with (typically)
512-byte alignment and multiple-of-512-byte size.

The tricky part is when a write starts and/or ends partway through a
filesystem block which has just been added.  We need to zero out the
parts of that block which lie outside the written region.

We handle that by putting appropriately-sized parts of the ZERO_PAGE
into sepatate BIOs.

The generic_direct_IO() function has been changed so that the
filesystem must pass in the address of the block_device against which
the IO is to be performed.  I'd have preferred to not do this, but we
do need that info at that time so that alignment checks can be
performed.

If the filesystem passes in a NULL block_device pointer then we fall
back to the old behaviour - must align with the fs blocksize.

There is no trivial way for userspace to know what the minimum
alignment is - it depends on what bdev_hardsect_size() says about the
device.  It is _usually_ 512 bytes, but not always.  This introduces
the risk that someone will develop and test applications which work
fine on their hardware, but will fail on someone else's hardware.

It is possible to query the hardsect size using the BLKSSZGET ioctl
against the backing block device.  This can be performed at runtime or
at application installation time.

23 years ago[PATCH] restructure direct-io to suit bio_add_page
Andrew Morton [Tue, 29 Oct 2002 00:22:18 +0000 (16:22 -0800)]
[PATCH] restructure direct-io to suit bio_add_page

The direct IO code was initially designed to allocate a known-sized
BIO, to fill it with pages and to then send it off.

Then along came bio_add_page().  Really, it broke direct-io.c - it
meant that the direct-IO BIO assembly code no longer had a-priori
knowledge of whether a page would fit into the current BIO.

Our attempts to rework the initial design to play well with
bio_add_page() really weren't adequate.  The code was getting more and
more twisty and we kept finding corner-cases which failed.

So this patch redesigns the BIO assembly and submission path of the
direct-IO code so that it better suits the bio_add_page() semantics.

It introduces another layer in the assembly phase: the 'cur_page' which
is cached in the dio structure.

The function which walks the file mapping do_direct_IO() simply emits a
sequence of (page,offset,len,sector) quads into the next layer down -
submit_page_section().

submit_page_section() is responsible for looking for a merge of the new
quad against the previous page section (same page).  If no merge is
possible it passes the currently-cached page down to the next level,
dio_send_cur_page().

dio_send_cur_page() will try to add the current page to the current
BIO.  If that fails, the current BIO is submitted for IO and we open a
new one.

So it's all nicely layered.  The assembly of sections-of-page into the
current page closely mirrors the assembly of sections-of-BIO into the
current BIO.

At both of these levels everything is done in a "deferred" manner: try
to merge a new request onto the currently-cached one.  If that fails
then send the currently-cached request and then cache this one instead.

Some variables have been renamed to more closely represent their usage.

Some thought has been put into ownership of the various state variables
within `struct dio'.  We were updating and inspecting these in various
places in a rather hard-to-follow manner.  So things have been reworked
so that particular functions "own" particular parts of the dio
structure.  Violators have been exterminated and commentary has been
added to describe this ownership.

The handling of file holes has been simplified.

As a consequence of all this, the code is clearer and simpler than it
used to be, and it now passes the modified-for-O_DIRECT fsx-linux
testing again.

23 years ago[PATCH] invalidate_inode_pages fixes
Andrew Morton [Tue, 29 Oct 2002 00:22:13 +0000 (16:22 -0800)]
[PATCH] invalidate_inode_pages fixes

Two fixes here.

First:

Fixes a BUG() which occurs if you try to perform O_DIRECT IO against a
blockdev which has an fs mounted on it.  (We should be able to do
that).

What happens is that do_invalidatepage() ends up calling
discard_buffer() on buffers which it couldn't strip.  That clears
buffer_mapped() against useful things like the superblock buffer_head.
The next submit_bh() goes BUG over the write of an unmapped buffer.

So just run try_to_release_page() (aka try_to_free_buffers()) on the
invalidate path.

Second:

The invalidate_inode_pages() functions are best-effort pagecache
shrinkers.  They are used against pages inside i_size and are not
supposed to throw away dirty data.

However it is possible for another CPU to run set_page_dirty() against
one of these pages after invalidate_inode_pages() has decided that it
is clean.  This could happen if someone was performing O_DIRECT IO
against a file which was also mapped with MAP_SHARED.

So recheck the dirty state of the page inside the mapping->page_lock
and back out if the page has just been marked dirty.

This will also prevent the remove_from_page_cache() BUG which will occur
if someone marks the page dirty between the clear_page_dirty() and
remove_from_page_cache() calls in truncate_complete_page().

23 years ago[PATCH] libfs a_ops correctnes
Andrew Morton [Tue, 29 Oct 2002 00:22:07 +0000 (16:22 -0800)]
[PATCH] libfs a_ops correctnes

simple_prepare_write() currently memsets the entire page.  It only
needs to clear the parts which are outside the to-be-written region.
This change makes no difference to performance - that memset was just a
cache preload for the copy_from_user() in generic_file_write().  But
it's more correct.

Also, mark the page dirty in simple_commit_write(), not in
simple_prepare_write().  Because the page's contents are changed after
prepare_write().  This doesn't matter in practice, but it is setting a
bad example.

Also, add a flush_dcache_page() to simple_prepare_write().  Again, not
really needed because the page cannot be mapped into pagetables if it
is not uptodate.  But it is example code and should not be missing such
things.

23 years ago[PATCH] move ramfs a_ops into libfs
Andrew Morton [Tue, 29 Oct 2002 00:22:02 +0000 (16:22 -0800)]
[PATCH] move ramfs a_ops into libfs

From Bill Irwin.

Abstract out ramfs readpage(), prepare_write(), and commit_write()
operations.

Ram-backed filesystems are going to be doing a lot of zero-filled read
and write operations.  So in this patch, ramfs' implementations are
moved to libfs in anticipation of other callers.

23 years ago[PATCH] blkdev_get_block fix
Andrew Morton [Tue, 29 Oct 2002 00:21:56 +0000 (16:21 -0800)]
[PATCH] blkdev_get_block fix

Patch from Hugh Dickins <hugh@veritas.com>

Fix premature -EIO from blkdev_get_block: bdget initialize
bd_block_size consistent with bd_inode->i_blkbits (assigned by
new_inode).  Otherwise, subsequent set_blocksize can find bd_block_size
doesn't need updating, and skip updating i_blkbits, leaving them
inconsistent.

23 years ago[PATCH] fid dmi compile warning
Andrew Morton [Tue, 29 Oct 2002 00:21:51 +0000 (16:21 -0800)]
[PATCH] fid dmi compile warning

Local variable `data' is only used for debugging.

23 years agoMerge bk://linux.bkbits.net/linux-2.5
Dave Kleikamp [Mon, 28 Oct 2002 21:43:16 +0000 (13:43 -0800)]
Merge bk://linux.bkbits.net/linux-2.5
into hostme.bitkeeper.com:/ua/repos/j/jfs/linux-2.5

23 years agoMerge nuts.ninka.net:/home/davem/src/BK/network-2.5
David S. Miller [Mon, 28 Oct 2002 21:05:25 +0000 (13:05 -0800)]
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5

23 years agoConvert /proc/swaps to use seq_file API
Randy Dunlap [Mon, 28 Oct 2002 20:20:03 +0000 (15:20 -0500)]
Convert /proc/swaps to use seq_file API

23 years agoMerge nuts.ninka.net:/home/davem/src/BK/crypto-work-2.5
David S. Miller [Mon, 28 Oct 2002 20:12:46 +0000 (12:12 -0800)]
Merge nuts.ninka.net:/home/davem/src/BK/crypto-work-2.5
into nuts.ninka.net:/home/davem/src/BK/crypto-2.5

23 years agoinclude/linux/crypto.h: Include linux/string.h
David S. Miller [Mon, 28 Oct 2002 19:37:18 +0000 (11:37 -0800)]
include/linux/crypto.h: Include linux/string.h

23 years ago[CRYPTO]: Clean up header file usage.
David S. Miller [Mon, 28 Oct 2002 19:33:14 +0000 (11:33 -0800)]
[CRYPTO]: Clean up header file usage.

23 years ago[CRYPTO]: Add some documentation.
James Morris [Mon, 28 Oct 2002 19:29:29 +0000 (11:29 -0800)]
[CRYPTO]: Add some documentation.

23 years agoUpdate my email address.
Jeff Garzik [Mon, 28 Oct 2002 19:17:25 +0000 (14:17 -0500)]
Update my email address.

23 years ago[IPSEC]: Remove debugging code.
David S. Miller [Mon, 28 Oct 2002 19:10:01 +0000 (11:10 -0800)]
[IPSEC]: Remove debugging code.

23 years ago[CRYPTO]: Build/warning fixups.
David S. Miller [Mon, 28 Oct 2002 19:01:58 +0000 (11:01 -0800)]
[CRYPTO]: Build/warning fixups.

23 years agoMerge redhat.com:/home/jgarzik/repo/linus-2.5
Jeff Garzik [Mon, 28 Oct 2002 17:47:51 +0000 (12:47 -0500)]
Merge redhat.com:/home/jgarzik/repo/linus-2.5
into redhat.com:/home/jgarzik/repo/net-drivers-2.5

23 years ago[CRYPTO]: kunmap does not return a value.
David S. Miller [Mon, 28 Oct 2002 17:03:22 +0000 (09:03 -0800)]
[CRYPTO]: kunmap does not return a value.

23 years ago[IPSEC]: Add transform engine and AH implementation.
Alexey Kuznetsov [Mon, 28 Oct 2002 16:43:28 +0000 (08:43 -0800)]
[IPSEC]: Add transform engine and AH implementation.

23 years ago[CRYPTO]: Update to IV get/set interface.
James Morris [Mon, 28 Oct 2002 16:38:56 +0000 (08:38 -0800)]
[CRYPTO]: Update to IV get/set interface.

23 years ago[ESP]: Fix abort return values.
David S. Miller [Mon, 28 Oct 2002 16:31:36 +0000 (08:31 -0800)]
[ESP]: Fix abort return values.

23 years agoMerge redhat.com:/home/jgarzik/repo/linus-2.5
Jeff Garzik [Mon, 28 Oct 2002 16:14:13 +0000 (11:14 -0500)]
Merge redhat.com:/home/jgarzik/repo/linus-2.5
into redhat.com:/home/jgarzik/repo/net-drivers-2.5

23 years ago[FC4]: Kill all references to fcp_old_abort.
David S. Miller [Mon, 28 Oct 2002 16:11:03 +0000 (08:11 -0800)]
[FC4]: Kill all references to fcp_old_abort.

23 years ago[SPARC]: Bring QlogicPTI driver in line with modern EH handling.
David S. Miller [Mon, 28 Oct 2002 16:07:27 +0000 (08:07 -0800)]
[SPARC]: Bring QlogicPTI driver in line with modern EH handling.

23 years ago[SPARC]: Bring ESP driver in line with modern EH handling.
David S. Miller [Mon, 28 Oct 2002 15:58:26 +0000 (07:58 -0800)]
[SPARC]: Bring ESP driver in line with modern EH handling.

23 years agoRemove dead code in axnet_cs net driver.
Alan Cox [Mon, 28 Oct 2002 15:46:44 +0000 (10:46 -0500)]
Remove dead code in axnet_cs net driver.
del_timer_sync and printk fixes in fmvj18x_cs net driver.

23 years agomerge
Greg Kroah-Hartman [Mon, 28 Oct 2002 13:30:10 +0000 (05:30 -0800)]
merge

23 years agoResolve conflicts with aviro changes.
David S. Miller [Mon, 28 Oct 2002 12:11:20 +0000 (04:11 -0800)]
Resolve conflicts with aviro changes.

23 years ago[SPARC64]: Update defconfig.
David S. Miller [Mon, 28 Oct 2002 12:07:40 +0000 (04:07 -0800)]
[SPARC64]: Update defconfig.

23 years ago[SPARC64]: Remove silly rule to remove -pg from cflags.
David S. Miller [Mon, 28 Oct 2002 11:40:00 +0000 (03:40 -0800)]
[SPARC64]: Remove silly rule to remove -pg from cflags.

23 years ago[SPARC64]: Only HDIO_GETGEO_BIG_RAW exists in 2.5
David S. Miller [Mon, 28 Oct 2002 11:10:42 +0000 (03:10 -0800)]
[SPARC64]: Only HDIO_GETGEO_BIG_RAW exists in 2.5