|
|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Sergey Lentsov 2:4615/71.10 04 Oct 2001 17:56:58 To : All Subject : URL: http://www.lwn.net/2001/1004/kernel.php3 --------------------------------------------------------------------------------
[1][LWN Logo]
[2]Click Here
[LWN.net]
Sections:
[3]Main page
[4]Security
Kernel
[5]Distributions
[6]On the Desktop
[7]Development
[8]Commerce
[9]Linux in the news
[10]Announcements
[11]Linux History
[12]Letters
[13]All in one big page
See also: [14]last week's Kernel page.
Kernel development
The current kernel release is 2.4.10. The latest prepatch from Linus
is [15]2.4.11-pre2, released on October 1. It includes a number of
tweaks, including the unpleasant oops that afflicted some -pre1 users,
and a bunch of merging from the "ac" series. Among other things, the
new license tags (see the [16]September 6 kernel page) are going into
the standard kernel.
The latest prepatch from Alan Cox is [17]2.4.10-ac4. It includes most
of the 2.4.10 changes, but has explicitly left out the massive virtual
memory changes and other "seriously unsafe stuff." As Alan [18]says:
"I actually use the trees I release and I want to keep my machines
working."
For those who find current kernels to be a bit too much on the
bleeding edge, Mikulas Patocka has [19]released a patch to the 0.01
kernel fixing a bug in the disk request sorting algorithm. Linus
[20]responded by offering to make Mikulas the official maintainer of
the 0.01 series. Time to plug that 386 back in and help out...
On the licensing of security modules. A compromise wording has been
worked out for the Linux Security Module interface; the include file
will now carry this statement:
This file is GPL. See the Linux Kernel's COPYING file for details.
There is controversy over whether this permits you to write a
module that #includes this file without placing your module under
the GPL. Consult your lawyer for advice.
Meanwhile, it appears that the EXPORT_SYMBOL macro, which makes kernel
functions and data structures available to modules, will be augmented
with a new EXPORT_SYMBOL_GPL variant. The new tag, clearly, will make
a symbol available only to GPL-licensed code; the new license tags
should make it possible to enforce that restriction automatically.
Once EXPORT_SYMBOL_GPL is in place, the security module code may
switch over to using it. Maybe.
There is, however, no plan to switch any existing symbols over to a
GPL-only mode. Alan [21]says:
Linus has made it absolutely (as in he'll send out the killer
penguin with chainsaw if need be) clear that existing symbols wont
mysteriously turn GPL only.
So authors of existing, proprietary modules need not worry that they
will lose access to kernel symbols in the future.
Dealing with high network loads. The 2.4 networking stack works quite
well, for the most part. It does have one issue, however: dealing with
extremely high load. When very large numbers of packets are coming
into a system, interrupt processing tends to push all other work
aside. In the best case, no user-space work gets done. High loads can
also bring a 2.4.10 system down entirely.
Ingo Molnar decided to address this problem, and some related ones
having to do with the processing of software interrupts. [22]His patch
implements a technique called "soft mitigation." Essentially, if the
hardware interrupt rate exceeds a given threshold, the kernel simply
disables that interrupt for a timer tick interval (10ms on most
systems). The system thus gets a break in which it can catch up.
There are, however, some problems with this approach. The constant
threshold can not be set in a way that works for all situations; the
maximum tolerable interrupt rate depends on a great many things,
including the CPU speed, the cost of servicing the interrupt, and what
else is happening on the system. Simply disabling the offending
interrupt is easy (no cooperation from the driver or hardware is
required), but it is hard on the performance of any other device that
may be sharing the same interrupt line. Simply shutting down
interrupts on a network interface for 10ms can cause it to start
dropping packets in a big way, creating serious network performance
problems.
The biggest problem, however, may be that another solution exists and
has been in testing for some time. The NAPI ("New API") code,
developed by Jamal Hadi Salim, Robert Olsson, and Alexey Kuznetsov,
deals with interrupt load problems and much more. The NAPI work is
based on the techniques discussed at the [23]Kernel Summit last March,
but the work has progressed since then. It has not, perhaps, received
the degree of attention that it should have, though this discussion
has raised its profile somewhat. Now, if only the project had a proper
web site, it might become truly widely known...
NAPI works with modern network adaptors which implement a "ring" of
DMA buffers; each packet, as it is received, is placed into the next
buffer in the ring. Normally, the processor is interrupted for each
packet, and the system is expected to empty the packet from the ring.
The NAPI patch responds to the first interrupt by telling the adaptor
to stop interrupting; it will then check the ring occasionally as it
processes packets and pull new ones without the need for further
interrupts.
People who have been on the net for a long time might appreciate this
analogy: back in the 1980's, many of us had our systems configured to
beep (interrupt) at us ever time an email message arrived. In 2001,
beeping mail notifiers are far less common. There's almost always new
mail, there's no need for the system to be obnoxious about it.
Similarly, on a loaded system, there will always be new packets to
process, so there is no need for all those interrupts.
When the networking code checks an interface and finds that no more
packets have arrived, interrupts are reenabled and polling stops.
NAPI takes things a little farther by eliminating the packet backlog
queue currently maintained in the 2.4 network stack. Instead, the
adaptor's DMA ring becomes that queue. In this way, system memory is
conserved, packets are less likely to be reordered, and, if the load
requires that packets be dropped, they will be disposed of before ever
being copied into the kernel.
NAPI requires some changes to the network driver interface, of course.
The changes have been designed to be incremental, though. Drivers
which have not been converted will continue to function as always
(well, at least, as in 2.4.x), but the higher performance enabled by
NAPI will require modifications.
Linus [24]likes the NAPI approach, but has said nothing about when it
might be merged. One would normally expect it to go into 2.5, with a
possible backport to 2.4 later. In the modern world, though, one never
knows... It is also possible that parts of Ingo's patch may end up
being used as a last-resort, "save the system" response.
Those interested in NAPI can [25]download the USENIX paper describing
the techniques used. The actual code is available from [26]Robert
Olsson's FTP site.
Other patches and updates released this week include:
* Jaroslav Kysela has released [27]version 0.9.0beta8 of the ALSA
sound driver system.
* kdb v1.9 has been [28]released by Keith Owens.
* Also from Keith is [29]modutils 2.4.10.
* Robert Love has posted [30]a new version of his patch which
enables network devices to contribute to the random entropy pool.
* [31]Version 1.0.6 of IBM's Journaling Filesystem was announced by
Steve Best.
* Dave Jones has released [32]Powertweak 0.99.4, a tuning and
hardware configuration tool.
* A new single-copy pipe implementation was [33]posted by Manfred
Spraul.
* Jeremy Elson has [34]announced the first public release of the
"Framework for User-Space Devices," which allows a user-space
daemon to handle operations to device files.
* A [35]preemptible kernel patch was released by Robert Love.
* The third release candidate of LVM 1.0.1 was [36]announced by
Heinz Mauelshagen.
* [37]Loop-AES-v1.4e, a file and swap encryption module, was
released by Jari Ruusu.
Section Editor: [38]Jonathan Corbet
October 4, 2001
For other kernel news, see:
* [39]Kernel traffic
* [40]Kernel Newsflash
* [41]Kernel Trap
Other resources:
* [42]Kernel Source Reference
* [43]L-K mailing list FAQ
* [44]Linux-MM
* [45]Linux Scalability Effort
* [46]Kernel Newbies
* [47]Linux Device Drivers
[48]Next: Distributions
[49]Eklektix, Inc. Linux powered! Copyright Л 2001 [50]Eklektix, Inc.,
all rights reserved
Linux (R) is a registered trademark of Linus Torvalds
References
1. http://lwn.net/
2. http://ads.tucows.com/click.ng/pageid=001-012-132-000-000-003-000-000-012
3. http://lwn.net/2001/1004/
4. http://lwn.net/2001/1004/security.php3
5. http://lwn.net/2001/1004/dists.php3
6. http://lwn.net/2001/1004/desktop.php3
7. http://lwn.net/2001/1004/devel.php3
8. http://lwn.net/2001/1004/commerce.php3
9. http://lwn.net/2001/1004/press.php3
10. http://lwn.net/2001/1004/announce.php3
11. http://lwn.net/2001/1004/history.php3
12. http://lwn.net/2001/1004/letters.php3
13. http://lwn.net/2001/1004/bigpage.php3
14. http://lwn.net/2001/0927/kernel.php3
15. http://lwn.net/2001/1004/a/2.4.11-pre2.php3
16. http://lwn.net/2001/0906/kernel.php3
17. http://lwn.net/2001/1004/a/2.4.10-ac4.php3
18. http://lwn.net/2001/1004/a/ac-working.php3
19. http://lwn.net/2001/1004/a/sorting-patch.php3
20. http://lwn.net/2001/1004/a/lt-01.php3
21. http://lwn.net/2001/1004/a/killer-penguin.php3
22. http://lwn.net/2001/1004/a/im-interrupt.php3
23. http://lwn.net/2001/features/KernelSummit/
24. http://lwn.net/2001/1004/a/lt-napi.php3
25. http://www.cyberus.ca/~hadi/usenix-paper.tgz
26. ftp://robur.slu.se/pub/Linux/net-development/NAPI/
27. http://lwn.net/2001/1004/a/alsa.php3
28. http://lwn.net/2001/1004/a/kdb.php3
29. http://lwn.net/2001/1004/a/modutils.php3
30. http://lwn.net/2001/1004/a/netdev-random.php3
31. http://lwn.net/2001/1004/a/jfs.php3
32. http://lwn.net/2001/1004/a/powertweak.php3
33. http://lwn.net/2001/1004/a/single-copy-pipe.php3
34. http://lwn.net/2001/1004/a/fusd.php3
35. http://lwn.net/2001/1004/a/preemptible-kernel.php3
36. http://lwn.net/2001/1004/a/lvm.php3
37. http://lwn.net/2001/1004/a/loop-aes.php3
38. mailto:lwn@lwn.net
39. http://kt.zork.net/
40. http://www.atnf.csiro.au/~rgooch/linux/docs/kernel-newsflash.html
41. http://www.kerneltrap.com/
42. http://lksr.org/
43. http://www.tux.org/lkml/
44. http://www.linux.eu.org/Linux-MM/
45. http://lse.sourceforge.net/
46. http://www.kernelnewbies.org/
47. http://www.xml.com/ldd/chapter/book/index.html
48. http://lwn.net/2001/1004/dists.php3
49. http://www.eklektix.com/
50. http://www.eklektix.com/
--- ifmail v.2.14.os7-aks1
* Origin: Unknown (2:4615/71.10@fidonet)
Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/19861a7d19fd4.html, оценка из 5, голосов 10
|