Andrew Morton [Thu, 1 Apr 2004 05:51:54 +0000 (21:51 -0800)]
[PATCH] Replace MAX_MAP_COUNT with /proc/sys/vm/max_map_count
From: David Mosberger <davidm@napali.hpl.hp.com>
Below is a warmed up version of a patch originally done by Werner Almesberger
(see http://tinyurl.com/25zra) to replace the MAX_MAP_COUNT limit with a
sysctl variable. I thought this had gone into the tree a long time ago but
alas it has not and as luck would have it, the hard limit bit someone today
once again with a large app on a large machine.
Andrew Morton [Thu, 1 Apr 2004 05:51:13 +0000 (21:51 -0800)]
[PATCH] Fix hugetlb-vs-memory overcommit
From: Andy Whitcroft <apw@shadowen.org>
Two problems:
a) The memory overcommit code fails oto take into account all the pages
which are pinned by being reserved for the hugetlbpage pool
b) We're performing overcommit accounting and checking on behalf of
hugetlbpage vmas.
The main thrust is to ensure that VM_ACCOUNT actually only gets set on
vma's which are indeed accountable. With that ensured much of the rest
comes out in the wash. It also removes the hugetlb memory for the
overcommit_memory=2 case.
Andrew Morton [Thu, 1 Apr 2004 05:50:47 +0000 (21:50 -0800)]
[PATCH] ppc64: add useful warning message in hugepage code
From: David Gibson <david@gibson.dropbear.id.au>
This patch adds a debugging message to the ppc64 hugepage code when we
attempt to open the "low" (32-bit) hugepage window on PPC64, but can't
because a (non-hugepage) mapping already exists in the region.
Andrew Morton [Thu, 1 Apr 2004 05:50:36 +0000 (21:50 -0800)]
[PATCH] ppc64: allow MAP_FIXED hugepage mappings
From: David Gibson <david@gibson.dropbear.id.au>
On PowerPC64 the "low" hugepage range (at 2-3G for use by 32-bit processes)
needs to be activated before it can be used. hugetlb_get_unmapped_area()
automatically activates the range for hugepage mappings in 32-bit processes
which are not MAP_FIXED. However for MAP_FIXED mmap()s, even at a suitable
address will fail if the region is not already activated, because there is
no suitable callback from the generic MAP_FIXED code path into the arch
code.
This patch corrects this problem and allows PPC64 to do MAP_FIXED hugepage
mappings in the low hugepage range.
Andrew Morton [Thu, 1 Apr 2004 05:50:10 +0000 (21:50 -0800)]
[PATCH] ppc64: create dma_mapping_error
From: Anton Blanchard <anton@samba.org>
From: Stephen Rothwell <sfr@canb.auug.org.au>
This creates DMA_ERROR_CODE and uses it everywhere instead of
PCI_DMA_ERROR_CODE as we really want the three DMA mapping API's to return
a single error code. Also we now have dma_mapping_error and
vio_dma_mapping_error - and this latter and pci_dma_mapping_error both just
call the former.
Also a small fix in the vscsi - dma_map_sg returns 0 to indicate an error.
[XFS] Be explicit in adding in the non-transactional data to the reservation
estimate. We must add in for the worst case of a log stripe taking us the
full distance for a log stripe boundary.
[XFS] Define a new superblock field for more feature bits. Take the last
feature bit in sb_versionnum to use to indicate that the new feature bit
field is to be used.
Nathan Scott [Thu, 1 Apr 2004 20:38:16 +0000 (06:38 +1000)]
[XFS] Remove dup fdatasync/fdatawait call on fsync. Means we no longer
take the iolock here, and readers no longer conflict with concurrent
fsync activity. Kudos to Steve!
Linus Torvalds [Wed, 31 Mar 2004 10:18:18 +0000 (02:18 -0800)]
acpi: enable global wake events by default
People need the global wake events even when not sleeping:
they are used for lid open events at least on some laptops.
As such, they should be enabled by default.
You can disable them with "acpi_leave_gpes_disabled" if
your machine doesn't need them, and you want to get a few
less GPE's.
Bart De Schuymer [Wed, 31 Mar 2004 07:18:10 +0000 (23:18 -0800)]
[NETFILTER]: Do not require ip_forwarding for reset on a bridge.
Currently, to be able to send a reset in the FORWARD chain of iptables
for bridged traffic, ip forwarding must be enabled. This causes confusion
and in some situations people really don't want to enable ip forwarding.
The patch below lets the user send reset packets for bridged frames in
the FORWARD chain, with ip forwarding disabled (as long as there is a
route).
Jeff Garzik [Wed, 31 Mar 2004 04:01:25 +0000 (20:01 -0800)]
[PATCH] Fix oopses in fealnx driver TX path
In both uniprocessor and SMP, the fealnx driver's TX-submit path can
race against the interrupt handler, with disastrous results. Add the
lock that needed to be there all along, to fix this.
There's another problem in the RX path, that will be sent as a separate
patch, as soon as we get that patch 100% nailed down, and acceptable for
a Release Candidate.
Andrew Morton [Wed, 31 Mar 2004 00:34:59 +0000 (16:34 -0800)]
[PATCH] ppc64: clean up virtual <-> absolute code
From: Anton Blanchard <anton@samba.org>
Rusty Russell <rusty@rustcorp.com.au>
The iSeries has an arch-specific mapping from physical <-> absolute
addresses. Fortunately this is only used in a few places. However, the
following arch-specific macros/functions are provided in addition to the
standard macros:
Reduce them to these, with slightly shorter names, and taking either pointers
or unsigned long (as per __va and __pa) rather than making the caller cast:
abs_to_phys()
phys_to_abs()
And helper macros:
virt_to_abs()
abs_to_virt()
As is standard, virtual addresses are returned as void *, physical and
absolute as unsigned long.
Note that the change the iSeries_setup is a little subtle: ea is set to
__va(pa) above, so "phys_to_abs(pa)" is the same as "virt_to_abs(ea)".
Also, REALADDR is renamed to ISERIES_HV_ADDR and used in a couple of places
where appropriate.
This backs out Maneesh's sysfs patch that was recently added to the
kernel.
In its defense, the original patch did solve some fixes that could be
duplicated on SMP machines, but the side affect of the patch caused lots
of problems. Basically it caused kobjects to get their references
incremented when files that are not present in the kobject are asked for
(udev can easily trigger this when it looks for files call "dev" in
directories that do not have that file). This can cause easy oopses
when the VFS later ages out those old dentries and the kobject has its
reference finally released (usually after the module that the kobject
lived in was removed.)
I will continue to work with Maneesh to try to solve the original bug,
but for now, this patch needs to be applied.
[PATCH] ppc64: Add a sync in context switch on SMP
For the same reason as ppc32, we need to ensure that all stores
done on a CPU has reached the coherency domain and are visible
to loads done by another CPU when context switching as the same
thread may be rescheduled almost right away there.
On ppc32, CONFIG_PREEMPT wasn't settable along with CONFIG_SMP
for historical reasons (smp_processor_id() races). Those races have
been fixes since then (well, should have been at least) so it's now
safe to allow both options.
This fixes a few issues with context switch on ppc32:
- Makes sure we properly flush out all stores to the coherency domain
when switching out, since the same thread could be switched back in
on another CPU right away, those stores must be visible to all other
CPUs.
- Remove dssall in the assembly calls and do it now once in switch_mm
(stop vmx streams). Assume the G5 doesn't need a sync after dssall.
- Remove bogus isync in the loop setting the userland segment registers
- Do not switch the userland segments when the mm stays the same
Add a warning if enable_kernel_{fp,altivec} is called with preempt
enabled since this is always an error, and make sure the alignement
exception handler properly disables preempt when doing FP operations.
Andrew Morton [Tue, 30 Mar 2004 02:41:57 +0000 (18:41 -0800)]
[PATCH] Make pdflush run at nice 0
Since pdflush was converted to be launched by the kthread infrastructure it
has inherited keventd's `nice -10' setting. That hurts interactivity when
pdflush is doing lots of work writing back through the dm-crypt layer.
Andrew Morton [Tue, 30 Mar 2004 02:41:44 +0000 (18:41 -0800)]
[PATCH] catch errors when completing bio pairs
From: Mike Christie <michaelc@cs.wisc.edu>
A couple of drivers can sometimes fail the first segments in a bio then
requeue the rest of the request. In this situation, if the last part of
the bio completes successfully bio_pair_end_* will miss that the beginging
of the bio had failed becuase they just return one when bi_size is not yet
zero. The attached patch moves the error value test before the bi_size to
catch the above case.
Andrew Morton [Tue, 30 Mar 2004 02:41:31 +0000 (18:41 -0800)]
[PATCH] Fix BLKPREP_KILL
From: Jens Axboe <axboe@suse.de>
Samuel Rydh wrote:
If a MODE_SENSE(6) command is sent to an IDE cd using the CDROM_SEND_PACKET
ioctl, then the kernel freezes solidly. To reproduce this, one can take the
SCSI cmd [1a 08 31 00 10 00] and a 16 byte data buffer.
After some bug hunting, I found out that the following is what happens:
- ide-cd recognizes that MODE_SENSE(6) isn't supported and tries
to abort the request from ide_cdrom_prep_pc by returning BLKPREP_KILL.
- in elv_next_request(), the kill request is handled by
the following code:
while (end_that_request_first(rq, 0, rq->nr_sectors))
;
end_that_request_last(rq);
The while loop never exits. The end_that_request_first() doesn't do anything
since rq->nr_sectors is 0; it just returns "not-done" after handling those 0
bytes (rq->bio->bi_size is 16).
Jaroslav Kysela [Mon, 29 Mar 2004 14:26:33 +0000 (16:26 +0200)]
ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>
AC97 Codec Core
don't clobber other bits in SERIAL_CFG register with AD codecs when changing codec selection bits