Si_meminfo() is basically the same for all architectures (mips is a little
different by providing a value for the shared field that is different from
the originial intent, I will come back to this later), so it makes to have just
one instance of it:
- appletalk adds unnessesary additional arguments to bool
- net/wan has two comment statements on one line, separated by a + (!),
also fixup indentation here.
- sound uses a bool where it should use a dep_bool
This patch addresses Andrew's FIXME in buffer.c and adds a spinlock that
can be passed to the buffer list manipulation functions to the reiserfs
journal. This obsoletes the cheks for lock beeing NULL in buffer.c and
the global_bufferlist_lock.
In addition osync_inode_list is changed to use list_for_each_prev as in 2.4
instead of a hand-crafted loop.
A little comment to the reiserfs folks: your code would be _sooo_ much
easier to understand if you used temporary local variables for often
referenced fields..
Alexander Viro [Sun, 5 May 2002 08:12:00 +0000 (01:12 -0700)]
[PATCH] do_mounts.c printk fix
D'uh. Linus, 2.5 also needs that one.
BTW, folks - whoever had submitted "fixes" replacing /dev/root.old with
/old/dev/root.old several lines above that one are welcome to think
about the reasons why their patches removed "failed" from boot log.
Andrew Morton [Sun, 5 May 2002 08:10:37 +0000 (01:10 -0700)]
[PATCH] Fix concurrent writepage and readpage
Pages under writeback are not locked. So it is possible (and quite
legal) for a page to be under readpage() while it is still under
writeback. For a partially uptodate page with blocksize <
PAGE_CACHE_SIZE.
When this happens, the read and write I/O completion handlers get
confused over the shared BH_Async usage and the page ends up not
getting PG_writeback cleared. Truncate gets stuck in D state.
The patch separates the read and write I/O completion state.
It also shuffles the buffer fields around. Putting the
commonly-accessed b_state at offset zero shrinks the kernel by a few
hundred bytes because it can be accessed with indirect addressing, not
indirect+indexed.
Andrew Morton [Sun, 5 May 2002 08:10:16 +0000 (01:10 -0700)]
[PATCH] handle concurrent block_write_full_page and set_page_dirty
set_page_dirty() runs without the page lock. So
__block_write_full_page() needs to be able to cope with the page's
buffers being dirtied concurrently, on another CPU.
Andrew Morton [Sun, 5 May 2002 08:10:05 +0000 (01:10 -0700)]
[PATCH] Fix SMP race in truncate
Closes a small race window: testing PageWriteback() outside the page
lock introduces the possibility that page could be redirtied and have
writeback started after we've inspected PageWriteback.
Andrew Morton [Sun, 5 May 2002 08:09:55 +0000 (01:09 -0700)]
[PATCH] Allow ext3 pages to be written back by VM pressure
When ext3 refiles journalled buffers for writeback, it is better to set the
page dirty as well as the buffer. So the page will be written out by
VM pressure rather than by kjournald alone.
Andrew Morton [Sun, 5 May 2002 08:09:45 +0000 (01:09 -0700)]
[PATCH] decouple swapper_space treatment from other address_spaces
swapper_space is different. Its pages are locked during writeout, it
uses PAGE_SIZE rather than PAGE_CACHE_SIZE. Converting swap to look
more like the other address_spaces is a separate project. This patch
fully restores the old swap behaviour.
- Don't dirty swapcache page buffers in set_page_dirty().
Fixes a problem where __free_pte() runs set_page_dirty() and then
immediately runs ClearPageDirty(). The pages ends up clean, with
dirty buffers, and is unfreeable.
- Hence, don't mark the page clean if its buffers are clean - swap
does not have page/buffers dirty state coherency.
Andrew Morton [Sun, 5 May 2002 08:09:10 +0000 (01:09 -0700)]
[PATCH] suppress allocation warnings for radix-tree allocations
The recently-added page allocation failure warning generates a lot of
noise due to radix-tree node allocation failures. Those messages are
not interesting.
But I think the warning is otherwise useful - "I got an allocation
failure and then it crashed" is better than "it crashed".
The patch suppresses the message for ratnode allocation failures.
Martin Dalecki [Sun, 5 May 2002 08:03:57 +0000 (01:03 -0700)]
[PATCH] [PATCH 2.5.13 IDE 54
- Finish the changes from patch 53. ide_dma_actaion_t is gone now as well as
whole hidden code paths associated with it. I hope I didn't mess too many
things up with this, since the sheer size of the changes make them sensitive.
(Tested on tree different host chip sets so it shouldn't be too bad...)
Just still some minor cleanup remaining to be done in this area. The tags
lefts there are intentional.
In esp. the ide_dma_on method in cy82c693 looks suspicious.
Using udma_enable in ide-cd.c, ide-floppy.c and ide-tape.c is suspicious as
well. We have just uncovered it.
In the next round we will concentrate on the fixes people did send me
last time.
Martin Dalecki [Sun, 5 May 2002 08:03:45 +0000 (01:03 -0700)]
[PATCH] 2.5.13 IDE 53
- Start splitting the functions for host chip handling in to separate entities.
This change is quite sensitive and may cause some trouble but it's for
certain worth it anyway, because it should for example provide a much better
infrastructure for th handling of different architectures.
Martin Dalecki [Sun, 5 May 2002 08:03:36 +0000 (01:03 -0700)]
[PATCH] 2.5.13 IDE 52
Adapted from patch Bar³omiej ¯o³nierkiewicz:
- make straight8 a flag in ata_channel instead of byte
- don't store tables as code in drive_is_flashcard()
and ide_xfer_verbose()
- fix init_gendisk() (due to 2.5.13 blksize_size[] change)
- compress region requesting/releasing
in channel_probe() and ide_unregister()
- clean a bit ide_setup_ports()
Start of DMA handling tratment.
- Fix the parameters to ide_build_dmatable() to be channel and request.
Rename it to udma_new_table(). udma will mark arch specific functions
later.
- Let ide_start_dma() take the request directly as an arguemnt. Rename it to
ata_start_dma(). After realizing that the usage of the func argument of it
was bogous and that nobody is using rwproc we where able to remove both of
them.
- Fix ide_destroy_dmatable() to take the channel as argument and rename it to
udma_destroy_table(). This function should have possible architecture
specific implementation as well at some point in time.
- Split up the TCQ UDMA handling stuff in to proper functions. Jens must has
been dreaming as he introduced them ;-).
mm/memory.c:
- Remove always unused variable page from remap_pte_range().
- Fix printk in do_wp_page() so it doesn't print out an uninitialized
variable (old_page). Add KERN_ERR log level while at it.
NTFS: Release 2.0.6 - Major bugfix to make compatible with other kernel changes.
- Initialize the mftbmp address space properly now that there are more
fields in the struct address_space. This was leading to hangs and
oopses on umount since 2.5.12 because of changes to other parts of
the kernel. We probably want a kernel generic init_address_space()
function...
- Drop BKL from ntfs_readdir() after consultation with Al Viro. The
only caller of ->readdir() is vfs_readdir() which holds i_sem during
the call, and i_sem is sufficient protection against changes in the
directory inode (including ->i_size).
- Use generic_file_llseek() for directories (as opposed to
default_llseek()) as this downs i_sem instead of the BKL which is
what we now need for exclusion against ->f_pos changes considering we
no longer take the BKL in ntfs_readdir().
Osamu Tomita [Sat, 4 May 2002 04:56:49 +0000 (21:56 -0700)]
[PATCH] IDE PIO mode Fix
I found this bug in 2.5.10 first. And caused ext2 FS corruption.
We are porting Linux to PC-9801 architecture (made by NEC Japan).
It has PIO ONLY IDE I/F. So please check PIO mode too.
It was introduced in 2.5.9 and still exists in 2.5.13, and caused
superblock corruption for Andries. This fixes it.
Andrej Lajovic observes that in kd.h the definitions of K_NUMLOCK and
K_CAPSLOCK are interchanged. He is right (and this is the case since
1.1.54; nobody noticed because setleds.c does not use these defines).
So, here is the fix. No kernel behaviour is changed.
Trond Myklebust [Sat, 4 May 2002 04:28:41 +0000 (21:28 -0700)]
[PATCH] Do RPC over TCP reply message delivery in sock->data_ready()
xprt.c:
Speed up synchronous RPC over TCP calls by having the
replies delivered by the IPV4 "bottom half", instead of
switching to the rpciod process in order to call recvmsg().
- Remove sock_recvmsg() interface.
- Remove rpc_xprt_pending list and rpciod_tcp_dispatcher() interface.
- Use the new tcp_read_sock() interface to deliver data directly
from within tcp_data_ready().
sched.c:
- Remove references to rpciod_tcp_dispatcher.
xprt.h:
- New set of flags to reflect the TCP record read state.
i810-tco: Merge changes of the 2.4 kernel into the i810-tco module. Changes included are:
Support for 82801CA(M) chipset, timer margin needs to be > 3, support for WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT.
i810_rng: add support for other i8xx chipsets to the Random Number Generator module.
This is being done by adding the detection of the 82801E I/O Controller Hub.
Roman Zippel [Fri, 3 May 2002 07:03:30 +0000 (00:03 -0700)]
[PATCH] 2.5.13: remove VALID_PAGE
This patch removes VALID_PAGE(), as the test was always too late for
discontinous memory configuration. It is replaced with pfn_valid()/
virt_addr_valid(), which are used to test the original input value.
Other helper functions:
pte_pfn() - extract the page number from a pte
pfn_to_page()/page_to_pfn() - convert a page number to/from a page struct
Martin Dalecki [Fri, 3 May 2002 03:13:06 +0000 (20:13 -0700)]
[PATCH] 2.5.13 IDE 51
- Synchronize with Jens. Applying tons of janitorian stuff to his TCQ
code. Making functions static where appropriate and so on...
Marking the config entry for it experimental and so on. His
changelog:
2.5.13 now has the generic tag support that I wrote included,
here's an IDE TCQ that uses that. Changes since the version
posted for 2.5.12:
Fix the ide_tcq_invalidate_queue() WIN_NOP usage needed to clear
the internal queue on errors. It was disabled in the last
version due to the ata_request changes, it should work now.
Remove Promise tcq disable check, it works just fine on Promise
as long as we handle the two-drives-with-tcq case like we
currently do.
Martin Dalecki [Fri, 3 May 2002 03:12:56 +0000 (20:12 -0700)]
[PATCH] 2.5.13 IDE 50
- Fix wrong usage of time_after in ide.c. This should cure the drive seek
timeout problems some people where expierencing. This was clarified to me by
Bartek, who apparently checked whatever the actual code is consistent with
the comments in front of it. Thank you Bartlomiej Zolnierkiewicz.
I think now that we should have time_past(xxx) in <linux/timer.h>.
- Fix hpt34x.c compilation.
- Minor improvements in ide-pci and some cleanups in ide-probe.c
Andrew Morton [Thu, 2 May 2002 09:04:12 +0000 (02:04 -0700)]
[PATCH] VM dirty page balancing
- The balance_dirty_pages() logic is simply wrong. It goes:
if (value > threshold)
go_and_write(value - threshold);
which is just fine for a single process writing data. But
for many processes, they *all* go and bring things back into
balance, and too much data gets written out.
- The
go_and_write(this much)
logic is inoperative, because I turned off the ->writeback_mapping()
function in ext2. So a call to writeback_unlocked_inodes(this_much)
doesn't actually decrement and test *this_much. It will walk every
inode, all the time. Silly.
So quickly fixing the above things, the amount of dirty+writeback
memory in the machine nicely stabilises at 500 megabytes across
the run.
Simon Evans [Thu, 2 May 2002 08:44:50 +0000 (01:44 -0700)]
[PATCH] 2.5.12 - make usbvideo_register take a usb_device_id table
This patch makes usbvideo_register take a usb_device_id argument which it
can then pass to usb_register via the struct usb_device. Currently it passes
NULL.
Simon Evans [Thu, 2 May 2002 08:44:27 +0000 (01:44 -0700)]
[PATCH] 2.5.12 - make usbvideo.c use USBVIDEO_NUMFRAMES correctly
This patch makes usbvideo.c use the correct value of USBVIDEO_NUMFRAMES.
A few places in the code assumed it was 2. This patch was tested with
USBVIDEO_NUMFRAMES = 2,3,4,8,11,32
Wolfgang Fritz [Thu, 2 May 2002 07:53:02 +0000 (00:53 -0700)]
[PATCH] pl2303.c: do not reset termios settings in each open()
USB pl2303 driver
This is a patch which avoids resetting the termios settings to default
values (9600 Baud etc.) in each call to pl2303_open (). It does this
only on the first call to pl2303_set_termios. After that it sets the
termios to the last stored values.
This way commands like
stty -F /dev/ttyUSB0 115200
work the same way as with other serial ttys.
Oliver Neukum [Thu, 2 May 2002 07:31:51 +0000 (00:31 -0700)]
[PATCH] tiny race with devfs in printer
USB printer bugfix
looking through printer.c in preparation for shifting devfs
support to usbcore I noticed that printer advertises a device
through devfs before it can be opened.
As devfs, or more precisely devfsd can be used to trigger actions
this matters and is wrong.
David S. Miller [Wed, 1 May 2002 14:59:07 +0000 (07:59 -0700)]
fs/exportfs/expfs.c:dprintk
- Fix macro varargs usage, you need to specify a variable name
before the triple dot or else most current compilers complain.
See include/linux/ext2_fs.h:ext2_debug for another example where
it is done correctly.
David S. Miller [Wed, 1 May 2002 14:57:09 +0000 (07:57 -0700)]
fs/autofs/inode.c:parse_options
- Fix bug in strsep/strchr changes, dereference *this_char
not *value at top of while loop. This matches how the same
code in fs/autofs4/inode.c looks right now.
Withtout this autofs loading causes an OOPS as the first
time through the loop *value is dereferencing a NULL pointer.
Alexander Viro [Wed, 1 May 2002 05:26:24 +0000 (22:26 -0700)]
[PATCH] ATTR_MODE breakage
(originally caught by Paul Larson <plars@austin.ibm.com>)
Patch fixes a couple of idiotic bugs in notify_change() (my
fault). Unary operations have higher priority than binary ones, so
if (!valid & ATTR_MODE) doesn't do the right thing. I plead temporary
braindamage...
Andrew Morton [Wed, 1 May 2002 04:43:19 +0000 (21:43 -0700)]
[PATCH] Tweak VM dirty thresholds
The below patch on 2.5.12 takes the 'dbench 32' throughput on a
1024 megabyte machine from 35 megs/sec up to 125 megs/sec.
That's on the second run. The first run is much slower because
the ext2 bitmaps aren't in cache.
Anton Blanchard [Thu, 2 May 2002 03:01:43 +0000 (13:01 +1000)]
ppc64: Only implement thread priority macros on HMT or iSeries kernels
Drop back to eieio in spinlocks for the moment due to performance
issues of sync on power3