]> git.hungrycats.org Git - linux/log
linux
22 years agoLinux v2.5.53 v2.5.53
Linus Torvalds [Mon, 23 Dec 2002 13:20:31 +0000 (05:20 -0800)]
Linux v2.5.53

22 years agoRemove bogus duplicated (and wrong) function declaration.
Linus Torvalds [Mon, 23 Dec 2002 12:40:13 +0000 (04:40 -0800)]
Remove bogus duplicated (and wrong) function declaration.

22 years agoMerge bk://linux-scsi.bkbits.net/scsi-for-linus-2.5
Linus Torvalds [Mon, 23 Dec 2002 12:31:37 +0000 (04:31 -0800)]
Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years agoMerge bk://kernel.bkbits.net/davem/net-2.5
Linus Torvalds [Mon, 23 Dec 2002 12:28:42 +0000 (04:28 -0800)]
Merge bk://kernel.bkbits.net/davem/net-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years agoFix sysenter restart backwards jump, add offset comments,
Linus Torvalds [Mon, 23 Dec 2002 12:20:56 +0000 (04:20 -0800)]
Fix sysenter restart backwards jump, add offset comments,
and make the alignment of the return point
be saner.

22 years agoMerge ssh://mulgrave-w/BK/scsi-misc-2.5
James Bottomley [Mon, 23 Dec 2002 09:06:12 +0000 (03:06 -0600)]
Merge ssh://mulgrave-w/BK/scsi-misc-2.5
into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5

22 years agoMerge http://linux-scsi.bkbits.net/scsi-aic7xxx-2.5
James Bottomley [Mon, 23 Dec 2002 09:03:14 +0000 (03:03 -0600)]
Merge http://linux-scsi.bkbits.net/scsi-aic7xxx-2.5
into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5

22 years agoide-scsi changes for new mid level api and error handling in 2.5.52
Willem Riede [Mon, 23 Dec 2002 07:16:08 +0000 (01:16 -0600)]
ide-scsi changes for new mid level api and error handling in 2.5.52

Here is my proposal for bringing ide-scsi in line with the current kernel.

The attached patch does:

1. Change from old style initialization to the new hotplug initialization model.
   It involves declaring both a parent device and bus kernel object, which feels
   a bit awkward, but hey, it works.

2. Make ide-scsi request sense itself when CHECK_CONDITION is asserted. This
   change particularly makes ide-scsi run much smoother on my test box.

3. Implement eh_abort_handler and eh_device_reset_handler. I have no real way
   to thoroughly test these new routines, so for this part particularly I ask
   for peer review.

22 years ago[SCSI] update lasi700 for new parisc device model
James Bottomley [Mon, 23 Dec 2002 06:33:08 +0000 (00:33 -0600)]
[SCSI] update lasi700 for new parisc device model

22 years ago[PATCH] scsi_debug version 1.67 for lk 2.5.52
Douglas Gilbert [Mon, 23 Dec 2002 06:32:15 +0000 (00:32 -0600)]
[PATCH] scsi_debug version 1.67 for lk 2.5.52

This patch uses the module_param() facility introduced in
lk 2.5.52 (see linux/moduleparam.h) to simplify boot time
and module load time parameters for the scsi_debug driver.

The intent of module_param() is to unify
   - boot time parameters
   - module load time parameters
   - sysfs driver parameters
into a few simple calls (seen from the driver's point of view).
The sysfs capability hasn't been implemented yet. Using
module_param() removes over 100 lines of boilerplate code
from the scsi_debug driver.

Following the conventions suggested by Rusty, scsi_debug's
kernel boot time options have been changed to this form:
    scsi_debug.num_devs=2
while the module load options are now like this:
    modprobe scsi_debug num_devs=2

This patch also updates the Kconfig entry for the scsi_debug
driver.

22 years ago[SCSI 53c700] update to new generic device dma_ API
James Bottomley [Mon, 23 Dec 2002 06:28:20 +0000 (00:28 -0600)]
[SCSI 53c700] update to new generic device dma_ API

22 years ago[PATCH] Re: scsi_scan.c complaints...
Christoph Hellwig [Mon, 23 Dec 2002 05:56:37 +0000 (23:56 -0600)]
[PATCH] Re: scsi_scan.c complaints...

On Fri, Dec 20, 2002 at 08:29:23PM -0500, Doug Ledford wrote:
> And I was right.  One little q = NULL; is all that was missing.  Anyway,
> here's a printout of what startup looks like with this patch in place
> under 2.5.52.  This should make you happy Justin ;-)

Okay, I looked at the patches that are in mainline and they look pretty
cool to me.  When looking over the code (in preparation of implementing
Justin's suggestion to get rid of the highmem_io flag) I found quite
a bit small stuff to make the code in that area a lot cleaner:

- new helper scsi_calculate_bounce_limit to calculate the bounce
  limit for a scsi host, remove a copy of that code ni st.c
- scsi_initialize_queue gets replace with scsi_alloc_queue, this
  one now takes only a struct Scsi_Host and returns the request queue,
  it's paired with a small scsi_free_queue helper.

Diffstat:

 hosts.h     |    3 -
 scsi.c      |   43 ----------------------
 scsi.h      |    1
 scsi_scan.c |  113 ++++++++++++++++++++++++++++++++++--------------------------
 scsi_syms.c |    5 ++
 st.c        |   16 +-------
 6 files changed, 73 insertions(+), 108 deletions(-)

22 years ago[SCSI 53c700] remove no_module_init again, sigh
James Bottomley [Mon, 23 Dec 2002 05:54:34 +0000 (23:54 -0600)]
[SCSI 53c700] remove no_module_init again, sigh

22 years ago[PATCH] more clustered-apic-mode work
Martin J. Bligh [Mon, 23 Dec 2002 02:20:04 +0000 (18:20 -0800)]
[PATCH] more clustered-apic-mode work

Code mostly originally by James Cleverdon.

Abstracts out more clustered_apic_mode gunk into

 - ioapic_phys_id_map()
 - wakeup_secondary_cpu()
 - setup_portio_remap()

22 years ago[PATCH] clustered IPI cleanups
Martin J. Bligh [Mon, 23 Dec 2002 02:19:58 +0000 (18:19 -0800)]
[PATCH] clustered IPI cleanups

This one fixes up the IPI code to do something more sensible.  Sorry,
was just too ugly to leave it alone ...  but I did keep it seperated out
;-) Though this is not an equivalent transform it will only affect
NUMA-Q & summit - same op twice because some twit just split it out in
the last patch for both NUMA-Q & Summit.

Because clustered apic logical mode can't do arbitrary broadcasts of
addressing (it's not just a bitmap), I have to do send IPI instructions
as a sequence of unicasts.  However, there's already a loop in the
generic send_IPI_mask code to do that ...  there's no need to call
send_IPI_mask once for each CPU.  The comment I wrote at the time even
noted that this was silly.

22 years ago[PATCH] cleanup IPI code
Martin J. Bligh [Mon, 23 Dec 2002 02:19:53 +0000 (18:19 -0800)]
[PATCH] cleanup IPI code

Reformat the IPI stuff, specifically send_IPI_mask, send_IPI_allbutself,
and send_IPI_all.  Though the way they work is pretty silly for NUMA-Q,
I do an equivalent transform here, and fix the code in a seperate patch
(next one).  Goes into mach_ipi.h

22 years ago[PATCH] mpparse cleanups
Martin J. Bligh [Mon, 23 Dec 2002 02:19:48 +0000 (18:19 -0800)]
[PATCH] mpparse cleanups

Most of code originally by James Cleverdon.

More stuff reformed in the mpparse sections - this time not apic stuff,
so we create mach_mpparse.h and stick it in there.

Abstracts out:
 - mpc_oem_bus_info() - stores mappings between buses and nodes/quads.
 - mpc_oem_pci_bus()  - stores mappings between global and local pci bus numbers

Changes summit_check() into mps_oem_check() to generalise it.

22 years ago[PATCH] abstract out mpparse code
Martin J. Bligh [Mon, 23 Dec 2002 02:19:42 +0000 (18:19 -0800)]
[PATCH] abstract out mpparse code

Most of code originally by James Cleverdon.

Abstracts out code from the mpparse stuff into:

 - mpc_apic_id()
 - apicid_to_cpu_present()

instead of using clustered_apic_mode switching.

22 years ago[PATCH] abstract out clustered APIC code
Martin J. Bligh [Mon, 23 Dec 2002 02:19:35 +0000 (18:19 -0800)]
[PATCH] abstract out clustered APIC code

Code originally by James Cleverdon.

This abstracts out some sections that were switched by
clustered_apic_mode into the following functions:

 - apic_id_registered()
 - init_apic_ldr()
 - multi_timer_check()

Changes the return check in balance_irq from testing clustered_apic_mode
to testing "no_balance_irq" to be more general.

The removal of:
entry.dest.logical.logical_dest = TARGET_CPUS;
is because it's a duplicate (we do it twice in the same function for
no reason).

22 years ago[PATCH] NUMA-Q subarch directory
Martin J. Bligh [Mon, 23 Dec 2002 02:19:28 +0000 (18:19 -0800)]
[PATCH] NUMA-Q subarch directory

This adds a shell of a NUMA-Q subarch directory, and copies
mach-default/mach_apic.h into it.  I then edited the default version to
remove the NUMA-Q stuff, and the NUMA-Q version to remove the default
stuff.

22 years ago[PATCH] x86 subarch header files
Martin J. Bligh [Mon, 23 Dec 2002 02:19:23 +0000 (18:19 -0800)]
[PATCH] x86 subarch header files

Patch from John Stultz.

This reorganises the subarch files to put all the headers under the
include dir, instead of mixing them up with the C files.  The only
interesting part is the top section where he makes it fall back from the
subarch dir to the default dir if there's no .h file under the subarch
dir.

This means we can create multiple subarches without copying every single
file that any subarch wants into all the directories.  And is much
tidier, IMHO.

22 years agoMerge ssh://nuts.ninka.net//home/davem/src/BK/net-2.5
David S. Miller [Sun, 22 Dec 2002 15:30:15 +0000 (07:30 -0800)]
Merge ssh://nuts.ninka.net//home/davem/src/BK/net-2.5
into kernel.bkbits.net:/home/davem/net-2.5

22 years ago[Netfilter]: Forgotten dev_put for bridge-devices in nf_reinject.
Patrick McHardy [Sun, 22 Dec 2002 15:31:40 +0000 (07:31 -0800)]
[Netfilter]: Forgotten dev_put for bridge-devices in nf_reinject.

22 years ago[IPV4]: lockfree ipv4 route cache
Dipankar Sarma [Sun, 22 Dec 2002 15:30:10 +0000 (07:30 -0800)]
[IPV4]: lockfree ipv4 route cache

22 years ago[PPPOE]: Fix connect handling.
Michal Ostrowski [Sun, 22 Dec 2002 15:28:45 +0000 (07:28 -0800)]
[PPPOE]: Fix connect handling.

22 years ago[TCP]: Fix infinite loop when reading /proc/net/tcp with ipv6-sockets.
Anders Gustafsson [Sun, 22 Dec 2002 15:27:18 +0000 (07:27 -0800)]
[TCP]: Fix infinite loop when reading /proc/net/tcp with ipv6-sockets.

22 years agoMerge nuts.ninka.net:/home/davem/src/BK/sctp-2.5
David S. Miller [Sun, 22 Dec 2002 15:08:31 +0000 (07:08 -0800)]
Merge nuts.ninka.net:/home/davem/src/BK/sctp-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5

22 years agoMerge nuts.ninka.net:/home/davem/src/BK/network-2.5
David S. Miller [Sun, 22 Dec 2002 15:03:20 +0000 (07:03 -0800)]
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5

22 years agoMerge http://linux-lksctp.bkbits.net/lksctp-2.5
David S. Miller [Sun, 22 Dec 2002 14:59:21 +0000 (06:59 -0800)]
Merge http://linux-lksctp.bkbits.net/lksctp-2.5
into nuts.ninka.net:/home/davem/src/BK/sctp-2.5

22 years agoHandle single-stepping over fast system calls without polluting
Linus Torvalds [Sun, 22 Dec 2002 13:12:26 +0000 (05:12 -0800)]
Handle single-stepping over fast system calls without polluting
the fast case with a pushf/popf, by having the kernel debug trap
set the TIF_SINGLESTEP flag and causing the return path to dtrt.

22 years ago[PATCH] Avoid overwriting boot_cpu_data from trampoline code
Manfred Spraul [Sun, 22 Dec 2002 10:59:07 +0000 (02:59 -0800)]
[PATCH] Avoid overwriting boot_cpu_data from trampoline code

boot_cpu_data should contain the common capabilities of all cpus in the
system. identify_cpu [arch/i386/kernel/cpu/common.c] tries to enforce
that. But right now, the SMP trampoline code [arch/i386/kernel/head.S]
overwrites boot_cpu_data when the secondary cpus are started, i.e.
boot_cpu_data contains the capabilities from the last cpu that booted :-(

The attached patch adds a new, __initdata variable for the asm code.

22 years ago[PATCH] honour init= bootparm
Rusty Russell [Sun, 22 Dec 2002 10:57:11 +0000 (02:57 -0800)]
[PATCH] honour init= bootparm

Restore the accidentally dropped code to handle "init=xxx"

22 years ago[PATCH] Fix pageattr with mem=nopentium
Andi Kleen [Sun, 22 Dec 2002 10:56:09 +0000 (02:56 -0800)]
[PATCH] Fix pageattr with mem=nopentium

This fixes a hang in change_page_attr() that occured with mem=nopentium.

Make sure a non large page kernel mapping is handled correctly.
Previously the page reference counter was handled incorrectly in this
case.

Also hardens change_page_attr against bogus addresses.  You get an
EINVAL now.

22 years ago[PATCH] Make mem=nopentium clear cpu_has_pse
Andi Kleen [Sun, 22 Dec 2002 10:56:03 +0000 (02:56 -0800)]
[PATCH] Make mem=nopentium clear cpu_has_pse

"mem=nopentium" would clear the PSE bit in boot_cpu_data, but the CPU
detection later would overwrite it again from CPUID.

The large pages would be correctly disabled, but cpu_has_pse was lying.

This patch makes sure it stays clear when the option is given.

I also took the liberty to remove these obnoxious cpu capability
printks who give no use information (the data can be either gotten
from CPUID in user space in raw form or from /proc/cpuinfo processed)

22 years ago[PATCH] reorder 'rep;nop;' in the spinlock macro
Manfred Spraul [Sun, 22 Dec 2002 04:04:34 +0000 (20:04 -0800)]
[PATCH] reorder 'rep;nop;' in the spinlock macro

According to Intel's recommendation, 'rep;nop; should be called before
testing if the lock variable was modified (i.e. rep nop;cmp;jcc). The
current implementation does it the wrong way around: first test, then
wait, then branch. I've asked Asit Mallik from Intel, and he recommended
to change it.

It should be at least consistent: Right now, spinlock uses
'cmp;rep nop;jcc', rwlock uses 'rep nop;cmp;jcc'

22 years agoMerge http://linux-voyager.bkbits.net/dma-generic-mapping-2.5
Linus Torvalds [Sun, 22 Dec 2002 04:03:33 +0000 (20:03 -0800)]
Merge http://linux-voyager.bkbits.net/dma-generic-mapping-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years agoremove PCI_NEW_DMA_COMPAT_API
James Bottomley [Sun, 22 Dec 2002 04:56:42 +0000 (22:56 -0600)]
remove PCI_NEW_DMA_COMPAT_API

use a #include mechanism for generic implementations of the pci_
API in terms of the dma_ one

22 years agoMerge bk://linuxusb.bkbits.net/linus-2.5
Linus Torvalds [Sun, 22 Dec 2002 03:51:37 +0000 (19:51 -0800)]
Merge bk://linuxusb.bkbits.net/linus-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years ago[ALPHA] Add __param support to link script.
Richard Henderson [Sat, 21 Dec 2002 20:42:05 +0000 (12:42 -0800)]
[ALPHA] Add __param support to link script.

22 years agoMerge kroah.com:/home/linux/linux/BK/bleeding-2.5
Greg Kroah-Hartman [Sat, 21 Dec 2002 16:28:43 +0000 (08:28 -0800)]
Merge kroah.com:/home/linux/linux/BK/bleeding-2.5
into kroah.com:/home/linux/linux/BK/gregkh-2.5

22 years ago[PATCH] dev_printk macro
James Keniston [Sat, 21 Dec 2002 15:54:35 +0000 (07:54 -0800)]
[PATCH] dev_printk macro

22 years ago[PATCH] scanner.c: Support for devices with only one bulk-in endpoint
Henning Meier-Geinitz [Sat, 21 Dec 2002 15:07:29 +0000 (07:07 -0800)]
[PATCH] scanner.c: Support for devices with only one bulk-in endpoint

This patch (originally from Sergey Vlasov) adds support for scanners
with only one bulk-in endpoint. It's needed by all the GT-6801 based
scanners like the Artec Ultima 2000 or some of the Mustek BearPaws.

22 years ago[PATCH] scanner.h: add/fix vendor/product ids
Henning Meier-Geinitz [Sat, 21 Dec 2002 15:07:03 +0000 (07:07 -0800)]
[PATCH] scanner.h: add/fix vendor/product ids

This patch adds additional vendor and product ids for Nikon, Mustek,
Plustek, Genius, Epson, Canon, Umax, Hewlett-Packard, Benq, Agfa,
and Minolta scanners. The entries for Benq, Genius and Plustek
scanners have been updated.

I've also increased the version number to 0.4.9 and brought the
version numbers in scanner.c and scanner.h in sync.

22 years ago[PATCH] ehci, qtd submit and completions
David Brownell [Sat, 21 Dec 2002 15:03:20 +0000 (07:03 -0800)]
[PATCH] ehci, qtd submit and completions

 > ... usb-storage gets unhappy when
 > it decides (why?  and unsuccessfully) to reset high speed
 > devices.  ...

I don't know if that problem is resolved, but this patch
makes the question moot by handling an earlier error correctly.

The patch updates an incorrect test, so a short read will now
be treated as one.  Please merge.

This lets storage behave again.  As in, "mkfs -c" then copy
about 8 GB around, then 'dbench'.

22 years agoRemove old pci_dma_supported(), this is done by the generic
Linus Torvalds [Sat, 21 Dec 2002 14:42:37 +0000 (06:42 -0800)]
Remove old pci_dma_supported(), this is done by the generic
device DMA now (see <linux/pci.h> for the compat wrapper).

22 years agoallow pci primary busses to have parents in the device model
James Bottomley [Sat, 21 Dec 2002 17:16:30 +0000 (11:16 -0600)]
allow pci primary busses to have parents in the device model

22 years agogeneric device DMA API
James Bottomley [Sat, 21 Dec 2002 16:37:49 +0000 (10:37 -0600)]
generic device DMA API

add dma_ API to mirror pci_ DMA API but phrased to use struct
device instead of struct pci_dev.

See Documentation/DMA-API.txt for details

22 years agoMore mtrr/if.c fixes
Linus Torvalds [Sat, 21 Dec 2002 11:17:47 +0000 (03:17 -0800)]
More mtrr/if.c fixes
 - printk is not an acceptable substitute for errors
 - fix indentation of mtrr_close()
 - fix duplicate mtrr "release" fn pointer initializer

22 years ago[PATCH] remove unused macro MAP_ALIGN()
Andrew Morton [Sat, 21 Dec 2002 10:02:04 +0000 (02:02 -0800)]
[PATCH] remove unused macro MAP_ALIGN()

Patch from Christoph Hellwig <hch@lst.de>

remove unused macro MAP_ALIGN()

22 years ago[PATCH] remove memclass()
Andrew Morton [Sat, 21 Dec 2002 09:08:37 +0000 (01:08 -0800)]
[PATCH] remove memclass()

From hch.  Nothing is using the memclass() predicate.

22 years ago[PATCH] don't cacheline-align radix_tree_nodes
Andrew Morton [Sat, 21 Dec 2002 09:08:32 +0000 (01:08 -0800)]
[PATCH] don't cacheline-align radix_tree_nodes

They are 260 bytes.  We can get 15 per page without cacheline
alignment.  But we're currently only getting ten per page on P4.

22 years ago[PATCH] hugetlbfs: set inode->i_size
Andrew Morton [Sat, 21 Dec 2002 09:08:27 +0000 (01:08 -0800)]
[PATCH] hugetlbfs: set inode->i_size

An `ls' in hugetlbfs currently shows all files having zero size.

So, part-cosmetic, part-informative, we here set i_size to represent the
index of the highest present page in the mapping, plus one.

22 years ago[PATCH] hugetlb: report shared memory attachment counts
Andrew Morton [Sat, 21 Dec 2002 09:08:22 +0000 (01:08 -0800)]
[PATCH] hugetlb: report shared memory attachment counts

From Rohit Seth

Attached is a patch that passes the correct information back to user
land for number of attachments to shared memory segment.  I could have
done few more changes in a way nattach is getting set for regular cases
now, but just want to limit it at this point.

22 years ago[PATCH] hugetlb bugfixes
Andrew Morton [Sat, 21 Dec 2002 09:08:17 +0000 (01:08 -0800)]
[PATCH] hugetlb bugfixes

From Rohit Seth

1) Bug fixes (mainly in the unsuccessful attempts of hugepages).

   i) not modifying the value of key for unsuccessful key
      allocation

   ii) Correct usage of mmap_sem in free_hugepages

   iii) Proper unlocking of key->lock for partial hugepage
        allocations

2) Include the IPC_LOCK for permission to use hugepages via the
   syscall interface.  This brings the syscall interface into line with
   the hugetlbfs interface.

   It also adds permits users who are in the superuser group to
   access hugetlb resources.  This is so that database servers can run
   without elevated permissions.

3) Increment the key_counts during forks to correctly identify the
   number of processes references a key.

22 years ago[PATCH] ext3: fix buffer dirtying
Andrew Morton [Sat, 21 Dec 2002 09:08:12 +0000 (01:08 -0800)]
[PATCH] ext3: fix buffer dirtying

This is a forward-port from 2.4.  One of Stephen's recent fixes.  I
managed to merge up only half of it.  Here is the rest.  It should fix
the asserton failure reported by Robert Macaulay
<robert_macaulay@dell.com>

"There was a race window in buffer refiling where we could temporarily
 expose the journal's internal BH_JBDDirect flag as BH_Dirty, which is
 visible to the rest of the VFS.  That doesn't affect the journaling,
 because we hold journal_head locks while the buffer is in this
 transient state, but bdflush can see the buffer and write it out
 unexpectedly, causing ext3 to find the buffer in an unexpected state
 later."

 The fix simply keeps the dirty bits clear during the internal buffer
 processing, restoring the state to the private BH_JBDDirect once
 refiling is complete."

22 years ago[PATCH] ext3 use-after-free bugfix
Andrew Morton [Sat, 21 Dec 2002 09:08:07 +0000 (01:08 -0800)]
[PATCH] ext3 use-after-free bugfix

If ext3_add_nondir() fails it will do an iput() of the inode.  But we
continue to run ext3_mark_inode_dirty() against the potentially-freed
inode.  This oopses when slab poisoning is enabled.

Fix it so that we only run ext3_mark_inode_dirty() if the inode was
successfully instantiated.

22 years ago[PATCH] rename locals in ext2_new_block()
Andrew Morton [Sat, 21 Dec 2002 09:08:02 +0000 (01:08 -0800)]
[PATCH] rename locals in ext2_new_block()

Renames the local variables `bh2', `i', `j', 'k', and `tmp' to
something meanigful.  This brings ext2_new_block() into line with
ext3_new_block().

22 years ago[PATCH] ext2: smarter block allocation startup
Andrew Morton [Sat, 21 Dec 2002 09:07:57 +0000 (01:07 -0800)]
[PATCH] ext2: smarter block allocation startup

The same thing, for ext2.

22 years ago[PATCH] ext3: smarter block allocation startup
Andrew Morton [Sat, 21 Dec 2002 09:07:52 +0000 (01:07 -0800)]
[PATCH] ext3: smarter block allocation startup

When an ext3 (or ext2) file is first created the filesystem has to
choose the initial starting block for its data allocations.  In the
usual (new-file) case, that initial goal block is the zeroeth block of
a particular blockgroup.

This is the worst possible choice.  Because it _guarantees_ that this
file's blocks will be pessimally intermingled with the blocks of
another file which is growing within the same blockgroup.

We've always had this problem with files in the same directory.  With
the introduction of the Orlov allocator we now have the problem with
files in different directories.  And it got noticed.  This is the cause
of the post-Orlov 50% slowdown in dbench throughput on ext3 on
write-through caching SCSI on SMP.  And 25% in ext2.

It doesn't happen on uniprocessor because a single CPU will not exhibit
sufficient concurrency in allocation against two or more files.

It will happen on uniprocessor if the files are growing slowly.

It has always happened if the files are in the same directory.

ext2 has the same problem but it is siginficantly less damaging there
because of ext2's eight-block per-inode preallocation window.

The patch largely solves this problem by not always starting the
allocation goal at the zeroeth block of the blockgroup.  We instead
chop the blockgroup into sixteen starting points and select one of those
based on the lower four bits of the calling process's PID.

The PID was chosen as the index because this will help to ensure that
related files have the same starting goal.  If one process is slowly
writing two files in the same directory, we still lose.

Using the PID in the heuristic is a bit weird.  As an alternative I
tried using the file's directory's i_ino.  That fixed the dbench
problem OK but caused a 15% slowdown in the fast-growth `untar a kernel
tree' workload.  Because this approach will cause files which are in
different directories to spread out more.  Suppressing that behaviour
when the files are all being created by the same process is a
reasonable heuristic.

I changed dbench to never unlink its files, and used e2fsck to
determine how many fragmented files were present after a `dbench 32'
run.  With this patch and the next couple, ext2's fragmentation went
from 22% to 13% and ext3's from 25% to 10.4%.

22 years ago[PATCH] ext2/3: better starting group for S_ISREG files
Andrew Morton [Sat, 21 Dec 2002 09:07:46 +0000 (01:07 -0800)]
[PATCH] ext2/3: better starting group for S_ISREG files

ext2 places non-directory objects into the same blockgroup as their
directory, as long as that directory has free inodes.  It does this
even if there are no free blocks in that blockgroup (!).

This means that if there are lots of files being created at a common
point in the tree, they _all_ have the same starting blockgroup.  For
each file we do a big search forwards for the first block and the
allocations end up getting intermingled.

So this patch will avoid placing new inodes in block groups which have
no free blocks.

So far so good.  But this means that if a lot of new files are being
created under a directory (or multiple directories) which are in the
same blockgroup, all the new inodes will overflow into the same
blockgroup.  No improvement at all.

So the patch arranges for the new inode locations to be "spread out"
across different blockgroups if they are not going to be placed in
their directory's block group.  This is done by adding parent->i_ino
into the starting point for the quadratic hash.  i_ino was chosen so
that files which are in the same directory will tend to all land in the
same new blockgroup.

22 years ago[PATCH] ext2/3 commentary and cleanup
Andrew Morton [Sat, 21 Dec 2002 09:07:39 +0000 (01:07 -0800)]
[PATCH] ext2/3 commentary and cleanup

- Add some (much-needed) commentary to the ext2/ext3 block allocator
  state fields.

- Remove the SEARCH_FROM_ZERO debug code.  I wrote that to trigger
  some race and it hasn't been used in a year.

22 years ago[PATCH] Give kswapd writeback higher priority than pdflush
Andrew Morton [Sat, 21 Dec 2002 09:07:33 +0000 (01:07 -0800)]
[PATCH] Give kswapd writeback higher priority than pdflush

The `low latency page reclaim' design works by preventing page
allocators from blocking on request queues (and by preventing them from
blocking against writeback of individual pages, but that is immaterial
here).

This has a problem under some situations.  pdflush (or a write(2)
caller) could be saturating the queue with highmem pages.  This
prevents anyone from writing back ZONE_NORMAL pages.  We end up doing
enormous amounts of scenning.

A test case is to mmap(MAP_SHARED) almost all of a 4G machine's memory,
then kill the mmapping applications.  The machine instantly goes from
0% of memory dirty to 95% or more.  pdflush kicks in and starts writing
the least-recently-dirtied pages, which are all highmem.  The queue is
congested so nobody will write back ZONE_NORMAL pages.  kswapd chews
50% of the CPU scanning past dirty ZONE_NORMAL pages and page reclaim
efficiency (pages_reclaimed/pages_scanned) falls to 2%.

So this patch changes the policy for kswapd.  kswapd may use all of a
request queue, and is prepared to block on request queues.

What will now happen in the above scenario is:

1: The page alloctor scans some pages, fails to reclaim enough
   memory and takes a nap in blk_congetion_wait().

2: kswapd() will scan the ZONE_NORMAL LRU and will start writing
   back pages.  (These pages will be rotated to the tail of the
   inactive list at IO-completion interrupt time).

   This writeback will saturate the queue with ZONE_NORMAL pages.
   Conveniently, pdflush will avoid the congested queues.  So we end up
   writing the correct pages.

In this test, kswapd CPU utilisation falls from 50% to 2%, page reclaim
efficiency rises from 2% to 40% and things are generally a lot happier.

The downside is that kswapd may now do a lot less page reclaim,
increasing page allocation latency, causing more direct reclaim,
increasing lock contention in the VM, etc.  But I have not been able to
demonstrate that in testing.

The other problem is that there is only one kswapd, and there are lots
of disks.  That is a generic problem - without being able to co-opt
user processes we don't have enough threads to keep lots of disks saturated.

One fix for this would be to add an additional "really congested"
threshold in the request queues, so kswapd can still perform
nonblocking writeout.  This gives kswapd priority over pdflush while
allowing kswapd to feed many disk queues.  I doubt if this will be
called for.

22 years ago[PATCH] Remove PF_NOWARN
Andrew Morton [Sat, 21 Dec 2002 09:07:27 +0000 (01:07 -0800)]
[PATCH] Remove PF_NOWARN

We keep getting in a mess with the current->flags setting and
unsetting.

Remove current->flags:PF_NOWARN and create __GFP_NOWARN instead.

22 years ago[PATCH] misc fixes
Andrew Morton [Sat, 21 Dec 2002 09:07:22 +0000 (01:07 -0800)]
[PATCH] misc fixes

- A C99 initialiser in drivers/char/mem.c

- Remove unneeded deref in madvise_willneed()

22 years ago[PATCH] Add generic_file_readonly_mmap() for nommu
Andrew Morton [Sat, 21 Dec 2002 09:07:17 +0000 (01:07 -0800)]
[PATCH] Add generic_file_readonly_mmap() for nommu

Add a generic_file_readonly_mmap() for !CONFIG_MMU.

22 years ago[PATCH] more informative slab poisoning
Andrew Morton [Sat, 21 Dec 2002 09:07:12 +0000 (01:07 -0800)]
[PATCH] more informative slab poisoning

slab poisons objects with 0x5a both when they are constructed and when
they are freed.  So it is not possible to tell whether a deref of
0x5a5a5a5a was a use-before-initialisation bug or a use-after-free bug.

The patch changes it so that

1) A deref of 0x5a5a5a5a means use-of-uninitialised-memory

2) A deref of 0x6b6b6b6b means use-of-freed-memory.

22 years ago[PATCH] fix use-after-free bug in move_vma()
Andrew Morton [Sat, 21 Dec 2002 09:07:06 +0000 (01:07 -0800)]
[PATCH] fix use-after-free bug in move_vma()

move_vma() calls do_munmap() and then uses the memory at *new_vma.

But when starting X11 it just happens that the memory which do_munmap
unmapped had the same start address and the range at *new_vma.  So new_vma
is freed by do_munmap().

This was never noticed before because (vm_flags & VM_LOCKED) evaluates
false when vm_flags is 0x5a5a5a5a.  But I just changed that to 0x6b6b6b6b
and boom - we call make_pages_present() with start == end == 0x6b6b6b6b and
it goes BUG.

So I think the right fix here is for move_vma() to not inspect the values
of any vma's after it has called do_munmap().

The patch does that, for `new_vma'.

The local variable `vma' is also being used after the call do do_munmap(),
and this may also be a bug.  Proving that this is not so, and adding a
comment to explain why is hereby added to Hugh's todo list ;)

22 years ago[PATCH] fix a page dirtying race in vmscan.c
Andrew Morton [Sat, 21 Dec 2002 09:07:00 +0000 (01:07 -0800)]
[PATCH] fix a page dirtying race in vmscan.c

There's a small window in which another CPU could dirty the page after
we've cleaned it, and before we've moved it to mapping->dirty_pages().
The end result is a dirty page on mapping->locked_pages, which is
wrong.

So take mapping->page_lock before clearing the dirty bit.

22 years ago[PATCH] sync_fs deadlock fix
Andrew Morton [Sat, 21 Dec 2002 09:06:54 +0000 (01:06 -0800)]
[PATCH] sync_fs deadlock fix

Running a `mount -o remount' against ext3 deadlocks if there is heavy
write activity.  It's a sort of AB/BA deadlock caused by calling
log_wait_commit() under lock_super().  The caller holds lock_super()
and is waiting for a commit, but the commit cannot complete because
lock_super() is also used in the block allocator.

The way we fixed this in tha past is to drop the superblock lock inside
ext3.  The way this patch fixes it is to arrange for lock_super() to
not be held around the ->sync_fs() call.

Also: sync_filesystems is on the sys_sync() path and is racy wrt
unmount.  Check sb->s_root after taking sb->s_umount.

22 years agoSysenter cleanups (originals by Brian Gerst, updated and expanded by me):
Linus Torvalds [Sat, 21 Dec 2002 08:02:05 +0000 (00:02 -0800)]
Sysenter cleanups (originals by Brian Gerst, updated and expanded by me):
 - set up kernel stack pointer for sysenter at each context switch.
 - disable sysenter while in vm86 mode.
 - clean up mtrr number defines and SEP feature testing

22 years ago[AF_KEY]: Fix comment typo.
Christoph Hellwig [Sat, 21 Dec 2002 06:09:21 +0000 (22:09 -0800)]
[AF_KEY]: Fix comment typo.

22 years agoGet rid of silly printk's in recent mtrr driver changes.
Linus Torvalds [Sat, 21 Dec 2002 05:47:13 +0000 (21:47 -0800)]
Get rid of silly printk's in recent mtrr driver changes.

22 years ago[PATCH] PCI: setup-xx fixes
Ivan Kokshaysky [Sat, 21 Dec 2002 05:24:28 +0000 (21:24 -0800)]
[PATCH] PCI: setup-xx fixes

Don't disable PCI devices before changing the BARs, as discussed
recently.  Disabling PCI_COMMAND_MASTER bit is an obvious bug.

Further, pdev_enable_device() is a leftover from very old (2.0, I guess)
alpha PCI code.  It's used in pci_assign_unassigned_resources() to
enable *every* PCI device in the system.  So, if we have two graphic
cards on the same bus, both with legacy VGA IO...  oops.

Actually, only alpha relied on that due to the lack of
pcibios_enable_device (which has been already fixed).

22 years ago[PATCH] new attempt at sys_poll allocation (was: Re: Poll patches..)
Manfred Spraul [Sat, 21 Dec 2002 04:38:39 +0000 (20:38 -0800)]
[PATCH] new attempt at sys_poll allocation (was: Re: Poll patches..)

This replaces the dynamically allocated two-level array in sys_poll with
a dynamically allocated linked list.  The current implementation causes
at least two alloc/free calls, even if only one or two descriptors are
polled.  This reduces that to one alloc/free, and the .text segment is
around 220 bytes shorter.  The microbenchmark that polls one pipe fd is
around 30% faster.  [1140 cycles instead of 1604 cycles, Celeron mobile
1.13 GHz]

22 years agoMerge bk://linux-dj.bkbits.net/agpgart
Linus Torvalds [Sat, 21 Dec 2002 03:41:35 +0000 (19:41 -0800)]
Merge bk://linux-dj.bkbits.net/agpgart
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years agoMerge tetrachloride.(none):/mnt/stuff/kernel/2.5/bk-linus
Dave Jones [Sat, 21 Dec 2002 13:42:32 +0000 (12:42 -0100)]
Merge tetrachloride.(none):/mnt/stuff/kernel/2.5/bk-linus
into tetrachloride.(none):/mnt/stuff/kernel/2.5/agpgart

22 years ago[AGP] Make things compile again if AGP3=n
Dave Jones [Sat, 21 Dec 2002 13:28:52 +0000 (12:28 -0100)]
[AGP] Make things compile again if AGP3=n

22 years agoMerge http://lia64.bkbits.net/to-linus-2.5
Linus Torvalds [Sat, 21 Dec 2002 03:18:20 +0000 (19:18 -0800)]
Merge http://lia64.bkbits.net/to-linus-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years ago[AGP] Make i845g use correct initialisation routine.
Michael Milligan [Fri, 20 Dec 2002 17:59:34 +0000 (16:59 -0100)]
[AGP] Make i845g use correct initialisation routine.

22 years agoia64: Fix printing of memory attributes.
David Mosberger [Fri, 20 Dec 2002 16:57:36 +0000 (08:57 -0800)]
ia64: Fix printing of memory attributes.

22 years agoia64: Finish 2.5.52+ merge. lia64-v2.5.52+
David Mosberger [Fri, 20 Dec 2002 15:51:49 +0000 (07:51 -0800)]
ia64: Finish 2.5.52+ merge.

22 years ago[IPV6]: Missing in6_dev_put in router discovery.
Krishna Kumar [Fri, 20 Dec 2002 15:14:42 +0000 (07:14 -0800)]
[IPV6]: Missing in6_dev_put in router discovery.

22 years agoMerge ssh://linux-scsi@linux-scsi.bkbits.net/scsi-aic7xxx-2.5
James Bottomley [Fri, 20 Dec 2002 15:12:09 +0000 (09:12 -0600)]
Merge ssh://linux-scsi@linux-scsi.bkbits.net/scsi-aic7xxx-2.5
into raven.il.steeleye.com:/home/jejb/BK/scsi-aic-2.5

22 years agoIgnore ".ko" files - kernel module objects.
Linus Torvalds [Fri, 20 Dec 2002 15:10:28 +0000 (07:10 -0800)]
Ignore ".ko" files - kernel module objects.

22 years agoMake NFS compile even without NFS_V4 support
Linus Torvalds [Fri, 20 Dec 2002 15:09:30 +0000 (07:09 -0800)]
Make NFS compile even without NFS_V4 support

22 years ago[PKTGEN]: Mark some functions static.
Arnd Bergmann [Fri, 20 Dec 2002 15:03:16 +0000 (07:03 -0800)]
[PKTGEN]: Mark some functions static.

22 years ago[BONDING]: Update to version 2.4.20-20021210.
Chad N. Tindel [Fri, 20 Dec 2002 14:56:31 +0000 (06:56 -0800)]
[BONDING]: Update to version 2.4.20-20021210.

22 years agoMerge bk://lsm.bkbits.net/linus-2.5
Linus Torvalds [Fri, 20 Dec 2002 14:46:47 +0000 (06:46 -0800)]
Merge bk://lsm.bkbits.net/linus-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux

22 years agoMerge clashes between the req_offset() and the XDR cleanups
Linus Torvalds [Fri, 20 Dec 2002 14:34:03 +0000 (06:34 -0800)]
Merge clashes between the req_offset() and the XDR cleanups

22 years ago[PATCH] cleanup: simplify req_offset function in NFS client
Chuck Lever [Fri, 20 Dec 2002 14:27:42 +0000 (06:27 -0800)]
[PATCH] cleanup: simplify req_offset function in NFS client

Description:
  everywhere the NFS client uses the req_offset() function today, it adds
  req->wb_offset to the result.  this patch simply makes "+req->wb_offset"
  a part of the req_offset() function.

Test status:
  Passes all Connectathon '02 tests with v2, v3, UDP and TCP.  Passes
  NFS torture tests on an x86 UP highmem system.

22 years ago[PATCH] give NFS client a "set_page_dirty" address space op.
Chuck Lever [Fri, 20 Dec 2002 14:27:37 +0000 (06:27 -0800)]
[PATCH] give NFS client a "set_page_dirty" address space op.

Description:
  The default set_page_dirty address space op is too heavyweight for NFS,
  which doesn't use buffers.

22 years ago[PATCH] use kmap_atomic instaed of kmap in NFS client
Chuck Lever [Fri, 20 Dec 2002 14:27:31 +0000 (06:27 -0800)]
[PATCH] use kmap_atomic instaed of kmap in NFS client

Description:
  andrew morton suggested there are places in the NFS client that could
  make use of kmap_atomic instead of vanilla kmap in order to improve
  scalability on 8-way and higher SMP systems.

Test status:
  Passes all Connectathon '02 tests with v2 and v3, UDP and TCP; passes
  NFS torture tests on a UP HIGHMEM x86 system.

22 years ago[PATCH] Reduce redundancy in v850 linker scripts
Miles Bader [Fri, 20 Dec 2002 14:18:55 +0000 (06:18 -0800)]
[PATCH] Reduce redundancy in v850 linker scripts

This moves most of the duplicated text in the various v850 platform-
specific linker scripts (each of which was previously completely
standalone) into cpp macros in vmlinux.lds.S, which are then used by the
platform linker scripts as appropriate.  This should make the scripts a
lot easier to maintain.

Also, a number of linker-script bugs are fixed.

22 years ago[PATCH] Pass extra signal handler args correctly on the v850
Miles Bader [Fri, 20 Dec 2002 14:18:34 +0000 (06:18 -0800)]
[PATCH] Pass extra signal handler args correctly on the v850

The old code seems completely wrong; I guess it was just left over from
whichever architecture this code was copied from.

22 years ago[PATCH] Add some v850 elf constants
Miles Bader [Fri, 20 Dec 2002 14:18:29 +0000 (06:18 -0800)]
[PATCH] Add some v850 elf constants

These are used for the new in-kernel module loader (actually not all the
relocation types are used right now, but are included for completeness).

Only the EM_CYGNUS_V850 macro, which is in a global namespace, is added
to <linux/elf.h>; the relocation types, which are private to the v850,
are added to <asm-v850/elf.h>.  [Perhaps some other archs can do a
similar split, to reduce the bloat in <linux/elf.h>]

22 years ago[PATCH] Add v850 support for `sys_restart_syscall'
Miles Bader [Fri, 20 Dec 2002 14:18:24 +0000 (06:18 -0800)]
[PATCH] Add v850 support for `sys_restart_syscall'

22 years ago[PATCH] Make some symbol exports conditional on CONFIG_MMU
Miles Bader [Fri, 20 Dec 2002 14:18:18 +0000 (06:18 -0800)]
[PATCH] Make some symbol exports conditional on CONFIG_MMU

A few symbols are only defined when CONFIG_MMU=y, but are exported
(by kernel/ksyms.c) unconditionally.  This patch makes them conditional.

22 years ago[PATCH] Update v850 includes for slimmed-down sched.h
Miles Bader [Fri, 20 Dec 2002 14:18:12 +0000 (06:18 -0800)]
[PATCH] Update v850 includes for slimmed-down sched.h

Adds extra includes needed because sched.h doesn't include them anymore,
and removes includes of sched.h where they're not really necessary.

22 years ago[PATCH] Fix CPU bitmask truncation
William Lee Irwin III [Fri, 20 Dec 2002 14:05:38 +0000 (06:05 -0800)]
[PATCH] Fix CPU bitmask truncation

Fix task->cpus_allowed bitmask truncations on 64.bit architectures.

Originally by Bjorn Helgaas for 2.4.x.

22 years agoMerge master.kernel.org:/home/hch/BK/xfs/linux-2.5
Linus Torvalds [Fri, 20 Dec 2002 13:59:30 +0000 (05:59 -0800)]
Merge master.kernel.org:/home/hch/BK/xfs/linux-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux