- 05 Sep, 2003 5 commits
-
-
Jamie Lokier authored
This changes the way futexes are indexed, so that they don't pin pages. It also fixes some bugs with private mappings and COW pages. Currently, all futexes look up the page at the userspace address and pin it, using the pair (page,offset) as an index into a table of waiting futexes. Any page with a futex waiting on it remains pinned in RAM, which is a problem when many futexes are used, especially with FUTEX_FD. Another problem is that the page is not always the correct one, if it can be changed later by a COW (copy on write) operation. This can happen when waiting on a futex without writing to it after fork(), exec() or mmap(), if the page is then written to before attempting to wake a futex at the same adress. There are two symptoms of the COW problem: - The wrong process can receive wakeups - A process can fail to receive required wakeups. This patch fixes both by changing the indexing so that VM_SHARED mappings use the triple (inode,offset,index), and private mappings use the pair (mm,virtual_address). The former correctly handles all shared mappings, including tmpfs and therefore all kinds of shared memory (IPC shm, /dev/shm and MAP_ANON|MAP_SHARED). This works because every mapping which is VM_SHARED has an associated non-zero vma->vm_file, and hence inode. (This is ensured in do_mmap_pgoff, where it calls shmem_zero_setup). The latter handles all private mappings, both files and anonymous. It isn't affected by COW, because it doesn't care about the actual pages, just the virtual address. The patch has a few bonuses: 1. It removes the vcache implementation, as only futexes were using it, and they don't any more. 2. Removing the vcache should make COW page faults a bit faster. 3. Futex operations no longer take the page table lock, walk the page table, fault in pages that aren't mapped in the page table, or do a vcache hash lookup - they are mostly a simple offset calculation with one hash for the futex table. So they should be noticably faster. Special thanks to Hugh Dickins, Andrew Morton and Rusty Russell for insightful feedback. All suggestions are included.
-
bk://kernel.bkbits.net/davem/net-2.5Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
Bartlomiej Zolnierkiewicz authored
From Matias Alejo Garcia <kernel@matiu.com.ar>.
-
Russell King authored
MODULE_ALIAS_LDISC() is not in any way architecture-specific, so don't put it in architecture header files. Here's a patch which moves it to a more sensible location.
-
Jens Axboe authored
The "insert_here" list pointer logic was broken, and unnecessary. Kill it and its associated logic off completely - just tell the IO scheduler what kind of insert it is. This also makes the *_insert_request strategies much easier to follow, imo.
-
- 04 Sep, 2003 28 commits
-
-
David S. Miller authored
-
David S. Miller authored
-
David S. Miller authored
-
John Levon authored
-
http://linux-lksctp.bkbits.net/lksctp-2.5David S. Miller authored
into nuts.ninka.net:/disk1/davem/BK/net-2.5
-
Stephen Hemminger authored
Since sdla.c now has locking instead of cli/sti, it shouldn't be completely busted on SMP. Also, the frad interface registration needed to be done once (and check the result), and undone on module unload.
-
David S. Miller authored
-
Stephen Hemminger authored
* get rid of leftover sti * no longer need MOD_INC/DEC stuff * get rid of dead code related to MOD_INC/DEC * use module_init/module_exit to cleanly run init code
-
Chas Williams authored
-
Chas Williams authored
-
Chas Williams authored
-
David S. Miller authored
into nuts.ninka.net:/disk1/davem/BK/net-2.5
-
Rusty Russell authored
try_then_request_module() does what crypto/autoload.c is doing, so replace it. Fix try_then_request_module(), too (thanks James).
-
Andrew Morton authored
I should have stayed in bed.
-
Sridhar Samudrala authored
Apparently the new gcc 3.2.2 allows local variable declarations within the code of a function if it is not used earlier. But older gcc's do not allow this.
-
Stephen Hemminger authored
-
Chas Williams authored
-
David S. Miller authored
into nuts.ninka.net:/disk1/davem/BK/net-2.5
-
Stephen Hemminger authored
Cleanup ikconfig - use single_open for built_with file. - get rid of unneeded globals - use copy_to_user instead of char at a time - only need the read routine, proc defaults to correct behaviour for the rest.
-
James Bottomley authored
When mmap MAP_SHARED is done on a file, it gets marked with VM_MAYSHARE and, if it's read/write, VM_SHARED. However, if it is remapped with mremap(), the MAP_SHARED is only passed into the new mapping based on VM_SHARED. This means that remapped read only MAP_SHARED mappings lose VM_MAYSHARE. This is causing us a problem on parisc because we have to align all shared mappings carefully to mitigate cache aliasing problems. The fix is to key passing the MAP_SHARED flag back into the remapped are off VM_MAYSHARE not VM_SHARED.
-
Bartlomiej Zolnierkiewicz authored
driver->supports_dma was used together with CONFIG_IDEDMA_ONLYDISK to limit DMA access to disk devices only. However Alan introduced new scheme in 2.5.63 and this field is not needed any longer because all ide drivers support DMA.
-
Bartlomiej Zolnierkiewicz authored
From Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
bk://linux-scsi.bkbits.net/scsi-for-linus-2.6Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
James Bottomley authored
into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.6
-
Andrew Morton authored
Some references to irq_stat[] snuck into generic code. It doesn't work on several architectures. So revert that little improvement to the original version.
-
Russell King authored
It seems that changing CONFIG_BLK_DEV_INITRD causes the whole kernel to rebuild due to an inappropriate ifdef in linux/fs.h - we should not conditionalise prototypes. In addition, real_root_dev is only used by two files (kernel/sysctl.c and init/do_mounts_initrd.c) so it makes even less sense that it was in linux/fs.h
-
bk://kernel.bkbits.net/davem/net-2.5Linus Torvalds authored
into home.osdl.org:/home/torvalds/v2.5/linux
-
John Levon authored
-
- 03 Sep, 2003 7 commits
-
-
David S. Miller authored
into kernel.bkbits.net:/home/davem/net-2.5
-
David S. Miller authored
-
David S. Miller authored
-
Harald Welte authored
This patch fixes a logic bug in NAT range calculations, which also causes a large slowdown when ICMP floods go through NAT. Author: Karlis Peisenieks
-
Andrew Morton authored
From: Rusty Russell <rusty@rustcorp.com.au> Rather than hardcoded names in modprobe, modules can offer their own aliases (which can be overridden by the config file). Here are the tty-ldisc ones.
-
Andrew Morton authored
From: mike.miller@hp.com Clean up the error handling in cciss_init_one().
-
Andrew Morton authored
From: Michael Pruznick <michael_pruznick@mvista.com> build errors: hermes.h: In function `hermes_set_irqmask': hermes.h:337: parse error before "do" hermes.h:337: parse error before ';' token hermes.h: In function `hermes_write_words': In mips, outw_p() is a #define do...while(0) which, in the case of ?:, results in a statement being used where an expression is required.
-