Martin Dalecki [Sun, 2 Jun 2002 10:28:08 +0000 (03:28 -0700)]
[PATCH] 2.5.19 blk.h and more about the ugly kids.
- Remove DEVICE_INTR and associated code from floppy driver.
- Savlage s390 xpram code from kernel version dependant compilation disease.
- Eliminate SET_INTR code from the places where it was used.
- Eliminate bogous support for multiple sbpcd controllers. The driver didn't
even compile right now before we could think about further supporting it at
all we have to get rid of this hack first.
Don't call invalidate_buffers in the release method there.
Why should it be necessary?
- Resurrect sonycd535 compilation.
- Let CURRENT request macro use the same primitive at the remaining QUEUE macro
in blk.h, which is still not quite right, but first things first :-).
Andrew Morton [Sun, 2 Jun 2002 10:24:28 +0000 (03:24 -0700)]
[PATCH] rename flushpage to invalidatepage
Fixes a pet peeve: the identifier "flushpage" implies "flush the page
to disk". Which is very much not what the flushpage functions actually
do.
The patch renames block_flushpage and the flushpage
address_space_operation to "invalidatepage".
It also fixes a buglet in invalidate_this_page2(), which was calling
block_flushpage() directly - it needs to call do_flushpage() (now
do_invalidatepage()) so that the filesystem's ->flushpage (now
->invalidatepage) a_op gets a chance to relinquish any interest which
it has in the page's buffers.
Andrew Morton [Sun, 2 Jun 2002 10:24:15 +0000 (03:24 -0700)]
[PATCH] tmpfs bugfixes
A patch from Hugh Dickins which fixes a couple of error-path leaks
related to tmpfs (I think).
Also fixes a yield()-inside-spinlock bug.
It also includes code to clear the final page outside i_size on
truncate. tmpfs should be returning zeroes when a truncated file is
later expanded and it currently is not.
Andrew Morton [Sun, 2 Jun 2002 10:24:04 +0000 (03:24 -0700)]
[PATCH] put in-memory filesystem dirty pages on the correct list
Replaces SetPageDirty() with set_page_dirty() in several places related
to in-memory filesystems.
SetPageDirty() is basically always the wrong thing to do. Pages should
be moved to the ->dirty_pages list when dirtied so that writeback can
see them.
Without this change, dirty pages against in-memory filesystems would
churn around on the inactive list all the time, rather than getting
pushed away onto the active list. A minor efficiency thing.
The patch also removes all the block_flushpage() calls from the swap
code in favour of a direct call to try_to_free_buffers().
The theory is that the page is locked, there is no I/O underway, nobody
else has access to the buffers so they MUST be freeable. A bunch of
BUG() checks have been added, and unless someone manages to trigger
one, the "block_flushpage() inside spinlock" problem is fixed.
Andrew Morton [Sun, 2 Jun 2002 10:22:42 +0000 (03:22 -0700)]
[PATCH] buffer_boundary() for ext3
Implement buffer_boundary() for ext3.
buffer_boundary() is an I/O scheduling hint which the filesystem's
get_block() function passes up to the BIO assembly code. It is
described in fs/mpage.c
The time to read 1,000 52 kbyte files goes from 8.6 seconds down to 2.9
seconds. 52 kbytes is the worst-case size.
Andrew Morton [Sun, 2 Jun 2002 10:22:29 +0000 (03:22 -0700)]
[PATCH] speed up writes
Speeds up generic_file_write() by not calling mark_inode_dirty() when
the mtime and ctime didn't change.
There may be concerns over the fact that this restricts mtime and ctime
updates to one-second resolution. But the interface doesn't support
that anyway - all the filesystem knows is that its dirty_inode()
superop was called. It doesn't know why.
So filesystems which support high-resolution timestamps already need to
make their own arrangements. We need an update_mtime i_op to support
those properly.
time to write a one megabyte file one-byte-at-a-time:
Andrew Morton [Sun, 2 Jun 2002 10:22:17 +0000 (03:22 -0700)]
[PATCH] fix swapcache packing in the radix tree
First some terminology: this patch introduces a kernel-wide `pgoff_t'
type. It is the index of a page into the pagecache. The thing at
page->index. For most mappings it is also the offset of the page into
that mapping. This type has a very distinct function in the kernel and
it needs a name. I don't have any particular plans to go and migrate
everything so we can support 64-bit pagecache indices on x86, but this
would be the way to do it.
This patch improves the packing density of swapcache pages in the radix
tree.
A swapcache page is identified by the `swap type' (indexes the swap
device) and the `offset' (into that swap device). These two numbers
are encoded into a `swp_entry_t' machine word in arch-specific code
because the resulting number is placed into pagetables in a form which
will generate a fault.
The kernel also need to generate a pgoff_t for that page to index it
into the swapper_space radix tree. That pgoff_t is usually
bitwise-identical to the swp_entry_t. That worked OK when the
pagecache was using a hash. But with a radix tree, it produces
catastrophically bad results.
x86 (and many other architectures) place the `type' field into the
low-order bits of the swp_entry_t. So *all* swapcache pages are
basically identical in the eight low-order bits. This produces a very
sparse radix tree for swapcache. I'm observing packing densities of 1%
to 2%: so the typical 128-slot radix tree node has only one or two
pages in it.
The end result is that the kernel needs to allocate approximately one
new radix-tree node for each page which is added to the swapcache. So
no wonder we're having radix-tree node exhaustion during swapout!
(It's actually quite encouraging that the kernel works as well as it
does).
The patch changes the encoding of the swp_entry_t so that its
most-significant bits contain the `type' field and the
least-significant bits contain the `offset' field, right-aligned.
That is: the encoding in swp_entry_t is now arch-independent. The new
file <linux/swapops.h> has conversion functions which convert the
swp_entry_t to and from its machine pte representation.
Packing density in the swapper_space mapping goes up to around 90%
(observed) and the kernel is tons happier under swap load.
An alternative approach would be to create new conversion functions
which convert an arch-specific swp_entry_t to and from a pgoff_t. I
tried that. It worked, but I liked it less.
Andrew Morton [Sun, 2 Jun 2002 10:21:53 +0000 (03:21 -0700)]
[PATCH] list_head debugging
A common and very subtle bug is to use list_heads which aren't on any
lists. It causes kernel memory corruption which is observed long after
the offending code has executed.
The patch nulls out the dangling pointers so we get a nice oops at the
site of the buggy code.
Jens Axboe [Sun, 2 Jun 2002 10:15:36 +0000 (03:15 -0700)]
[PATCH] update to the update
Too much copy'n paste between 2.4 and 2.5 code base, attached patch on
top of the previous block tag fixes makes it work/compile again. Sorry
about that.
Jens Axboe [Sun, 2 Jun 2002 10:15:02 +0000 (03:15 -0700)]
[PATCH] documentation and tq_disk removals
This should be the last of tq_disk, at least the trivial ones. md still
has some queue_task references, I'll let Ingo/Neil clean those up.
suspend is still broken, it was broken before too though. I guess Pavel
will want to fix that.
Martin Dalecki [Sun, 2 Jun 2002 09:42:20 +0000 (02:42 -0700)]
[PATCH] 2.5.19 IDE 80
- Sanitize the handling of the ioctl's and fix a bug on the way in dealing with
the WIN_SMART command where arguments where exchanged.
- Finally sanitize ioctl further until it turned out that we could get rid of
the special request type REQ_DRIVE_CMD entierly. We are now using
consistently REQ_DRIVE_ACB.
One hidden code path less again!
- Realize the ide_end_drive_cmd can be on the REQ_DRIVE_ACB only for ioctl() to
a disk. Eliminate it's usage from device type driver modules.
- Remove command member from struct hd_drive_task_hdr and place it in strcut
ata_taskfile. It is not common between the normal register file and HOB.
We will have to introduce some helper functions for particular command types.
Martin Dalecki [Sun, 2 Jun 2002 09:41:38 +0000 (02:41 -0700)]
[PATCH] 2.5.19 IDE 78
- Move ide_fixstring() from ide.c to probe.c, since this is the place, where it's
most used.
- Remove GET_STAT() - it's not used any longer.
- Remove last parameter of ide_error. Rename it to ata_error().
- Don't use ide_fixstring in qd65xx.c host chip driver. The model name is
already fixed in probe.c.
- Invent ata_irq_enable() for the handling of the trice nIEN bit of the
control register. Consistently use ch->intrproc method every time we toggle
this bit. This simply wasn't the case before!
- Disable interrupts on a previous channel only when we share them indeed.
- Eliminate simple drive command handling function drive_cmd.
- Simplify the ioctl handler. Move it to ioctl, since that's the only place
where it's actually used.
Petr Vandrovec [Sun, 2 Jun 2002 04:41:30 +0000 (21:41 -0700)]
[PATCH] missing argument to clear_user_page in v4l
David Mosberger added argument page to clear_user_page, but
apparently did not scan whole tree to find callers. Please apply.
It's the only such call in the non-arch specific portion of tree.
kbuild: Group targets which need / don't need .config
The main Makefile includes .config - on the other hand, it also
generates .config when using make *config. This leads to recursion
problems when we make the build depend on .config.
(.config is generated by *config. So after running make *config,
make notices one of its includes has been updated -> it restarts
to read the new contents. Unfortunately, the restart runs *config
again, which updates .config again. You get the picture)
Therefore, we're aiming at a two phase system: If no .config exists,
allow only make *config and make clean/mrproper. Afterwards, allow
all targets. (It's not much different from what we have today)
-DMODVERSIONS isn't used anymore, so it can go. Also, after cleaning
up include/linux/module.h, it's obvious that we don't need
include/linux/modversions.h at all if CONFIG_MODVERSIONS not set,
no need to generate it.
Rules.make explicitly lists files which depend on modversions.h,
since make dep cannot know about the
"-include include/linux/modversions.h" which gets added to
the command line. Now that we understand when it is needed, we can
even get that list right ;-)
Oh well, nice theory. .hdepend will touch module.h when modversions.h
changes, so we still get unnecessary recompiles. We really need to
switch to the new way of dependency generation, it gets all that
right without even thinking about these special cases.
We don't track dependencies for .ver files. In fact, we relied on that
checksum would only change if the corresponding exporting C source
changes. That's not true, of course, all of the included headers have
say as well. So we better force the hash to be checked
unconditionally every time "make dep" is run.
Observe that
defined(MODVERSIONS) == defined(CONFIG_MODVERSIONS) && defined(MODULE)
and from there I step by step simplified the logic in
include/linux/module.h - staying logically equivalent, but it is much
more understandable now, IMO.
Still added a huge comment trying to help other people understand
what kind of magic happens here.
There's no good reason why we would generate
include/linux/modversions.h from the top-level Makefile when
CONFIG_MODVERSION=y and from Rules.make otherwise.
Nor is there a good reason to call the target to do so
"update-modverfile" - "include/linux/modversions.h" makes
much more sense.
kbuild: Use the real instead of a phony target if we have one
o A rule which makes the include/asm symlink should have the target
"include/asm", not "symlinks". Likewise for ".hdepend".
(include/linux/modversions.h yet to follow)
Apart from being cleaner, this additionally gives us protection
when a command fails or the user interrupts execution:
E.g. for the case of "make dep", if the user interrupts at
some point, make will delete the target (now ".hdepend") for us,
so that at the next run, make knows that it needs to make the
dependencies again, while otherwise it would just use the
half-finished file.
o We don't need the include/asm symlink for the configuration targets,
we only need it before generating dependencies.
(The setup of having /usr/include/{linux,asm} symlinked to your
current kernel source is already broken in 2.5, so this change
doesn't break anything which wasn't broken before.)
o Add .hdepend to "prepare", i.e. what needs to be done before
we can start the recursive build. That means we can get rid of
the gross (and not always working) hack which made "make"
run "make dep" when .hdepend didn't exist yet.
o Mark the *config targets phony and improve some comments.
kbuild: Don't rebuild if vmlinux if nothing changed - fix
We would rebuild vmlinux if the command line to do so changed since
the last build. Unfortunately, we forgot to read the old command line,
so we always rebuilt it.
David Nelson [Fri, 31 May 2002 08:49:47 +0000 (01:49 -0700)]
[PATCH] PATCH: USB Scanner Driver 0.4.8 and new maintainer
Here's my last and final patch to the maintainer of USB Scanner Driver. Brian
Beattie <beattie@beattie-home.net> is now going to assume this role (thanks
Brian!). Brian brings some kernel level programming so I'm sure he'll be able
to conttribute to this list w/o any problems. I want to thank you all for your
support and help. A couple of you sent some personal msgs regarding my
departure - thank you.
* 0.4.8 5/30/2002
* - Added Mustek BearPaw 2400 TA. Thanks to Sergey
* Vlasov <vsu@mivlgu.murom.ru>.
* - Added Mustek 1200UB Plus and Mustek BearPaw 1200 CU ID's. These use
* the Grandtech GT-6801 chip. Thanks to Henning
* Meier-Geinitz <henning@meier-geinitz.de>.
* - Increased Epson timeout to 60 secs as requested from
* Karl Heinz Kremer <khk@khk.net>.
* - Changed maintainership from David E. Nelson to Brian
* Beattie <beattie@beattie-home.net>.
David Mosberger [Fri, 31 May 2002 04:13:44 +0000 (21:13 -0700)]
[PATCH] agp support for i460 and zx1 cleanup
The patch below adds first round of AGP support for the Intel 460
chipset
This won't actually build at the moment, but I think you prefer to
merge things piecemeal, and this portion of the patch is almost
guaranteed to be safe (affects only ia64).
David Mosberger [Fri, 31 May 2002 04:13:27 +0000 (21:13 -0700)]
[PATCH] pass "page" pointer to clear_user_page()/copy_user_page()
Hi Linus,
Are you willing to change the interfaces of clear_user_page() and
copy_user_page() so that they can receive the relevant page pointer as
a separate argument? I need this on ia64 to implement the lazy-cache
flushing scheme.
David Mosberger [Fri, 31 May 2002 04:13:19 +0000 (21:13 -0700)]
[PATCH] time-offset patch
On ia64 MP machines, we use the cycle counter register of each CPU to
obtain fine-grained time-stamps. At boot-time, we synchronize the
counters as close as possible (similar to x86, though with a different
algorithm). But even with this synchronization, there is still a
small (really: tiny) chance that a process bouncing from one CPU to
another could observe time going backwards. To guard against this, I
maintain a global variable called "last_time_offset" which keeps track
of the largest time-interpolation value returned so far. Most of this
is in platform-specific code (arch/ia64/kernel/time.c), but there are
a handful of places in platform-independent code where this variable
needs to be cleared to zero. This is what the patch below does. I
didn't put it inside CONFIG_IA64 because I think this can be useful
for other platforms, too. I suppose I could put it inside CONFIG_SMP
though this would make the code uglier. If you think it's OK, please
apply, otherwise, I'd appreciate your feedback.
David Mosberger [Fri, 31 May 2002 04:13:11 +0000 (21:13 -0700)]
[PATCH] trivial keyboard driver patch
This makes it possible to run the ia64 kernel both on platforms with the
legacy keyboard controller and those without (as is the case for the hp
zx1 platform, for example). The new code is inside #ifdef CONFIG_IA64,
though it would probably be a good idea to enable it unconditionally.
The patch is by Alex Williamson.
Frank Davis [Fri, 31 May 2002 04:02:42 +0000 (21:02 -0700)]
[PATCH] 2.5.19 : drivers/mtd/nftlcore.c
The following patch fixes a few compiler warnings, as well as provides
blk_init_queue() with the appropriate arguments. Please review for
inclusion. Thanks to Jens Axboe for fixing the casting hack in
the previous version of this patch.
Dave Jones [Fri, 31 May 2002 03:49:46 +0000 (20:49 -0700)]
[PATCH] Fix up agpgart.
Don't know what exactly happened, but somehow, the ZX1 support is
in your tree twice. This patch drops one of them, and also adds
in Intel i845 support to make up for it 8-)
Dave Jones [Fri, 31 May 2002 03:48:17 +0000 (20:48 -0700)]
[PATCH] hd.c compilation fix.
TIMEOUT_VALUE was killed from blk.h and moved to drivers that need it (like this one)
DEVICE_REQUEST is also dead, so we init the queue with the driver request handler