Главная страница


ru.linux

 
 - RU.LINUX ---------------------------------------------------------------------
 From : Sergey Lentsov                       2:4615/71.10   12 Apr 2001  17:11:09
 To : All
 Subject : URL: http://lwn.net/2001/0412/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.3. Linus has released [15]2.4.4pre2,
    which contains another set of fixes (including some of the bug fixes
    described below). Alan Cox, meanwhile, is up to [16]2.4.3ac4. While
    that patch is billed as containing mostly architecture-specific fixes,
    it also includes a merge of the [17]user-mode Linux port (which was
    covered on the [18]February 15 LWN kernel page).
    
    Nailing down the bugs. This week saw significant progress toward
    finding and fixing the remaining serious bugs in the 2.4 kernel.
      * The elusive problem that would cause processes to hang in an
        uninterruptible ("D") state turns out to have been caused by a bug
        in the reader/writer semaphore implementation. These semaphores
        had not been much used until recently, so the bug, which has been
        present for a long time, had not caused any trouble. Andrew
        Morton, after pounding on the problem for a while, finally gave up
        and [19]wrote a completely new implementation which fixes the
        problem - at the cost of breaking a fair amount of code. It also
        turns out to be hard to implement the new scheme on old 386
        processors, which lead to a long discussion of just how well 386
        systems should be supported at this stage. It looks like [20]it
        will be possible to make 386's work reasonably well, though, in
        the end.
      * The "filesystem corruption under high load" bug was, after great
        effort, [21]nailed down by Ingo Molnar and others at Red Hat.
        There is a rare case in the ext2 filesystem where it can drop a
        block that is still in use; it was introduced in 2.4.0-test6. A
        patch is out which fixes the problem.
      * One other D-state bug in the logical volume manager code was
        [22]fixed by Jens Axboe.
      * Jonathan Morton has posted [23]a patch with a number of virtual
        memory fixes - including one which fixes the problem where the
        out-of-memory process killer would be invoked too soon.
        
    Those two fixes should show up an a 2.4.4 prepatch shortly, though the
    semaphore fix may take a little while to stabilize.
    
    There appear to some outstanding issues with the aic7xxx SCSI adapter
    driver, though many of them seem to be the result of incorrectly
    applied patches.
    
    No more jiffies? An interesting discussion (and patch) came up this
    week which could lead to a very different timekeeping technique in the
    kernel. We'll start with a little background...
    
    The kernel currently handles most of its timekeeping tasks by means of
    the timer interrupt. It's a hardware interrupt driven by the clocks
    that all modern systems have; on most architectures the clock is
    programmed to deliver this interrupt 100 times per second (but the
    Alpha and IA-64 run at 1024). The clock interrupt handler does a
    number of things, including seeing if the current process has used its
    allotted CPU time, running any deferred tasks whose time has come,
    updating process accounting, and incrementing a little variable called
    jiffies. The jiffies counter is, among other things, a measure of the
    uptime of the system; it is used for many timing-related tasks within
    the kernel.
    
    The timer tick system has been seen as imperfect for a while. Among
    other things, it imposes a 10ms resolution on most timing-related
    activities, which can make it hard for user-space programs that need a
    tighter control over time. It also guarantees that process accounting
    will be inaccurate. Over the course of one 10ms jiffy, several
    processes might have run, but the one actually on the CPU when the
    timer interrupt happens gets charged for the entire interval.
    
    A new problem came up, however, over at IBM. On their S/390
    mainframes, they can run a great many independent "Linux images," each
    of which is a full, independent kernel. With its own timer interrupt.
    As Martin Schwidefsky pointed out in [24]his posting on the subject,
    with 1000 images running, the timer interrupt overhead gets to be
    significant - up to 100% of the available CPU. That, of course, is not
    the sort of mainframe performance that IBM had in mind, so they had to
    make some changes. Those changes, essentially, were to eliminate both
    the timer tick and the jiffies variable.
    
    The timer tick can go away because the kernel does, in general, know
    when something will next need its attention. There's a handy, sorted
    listed of upcoming timer events, and the kernel knows how long the
    current process should be allowed to run before being scheduled out.
    So, the system's interval timer can be set to exactly the right time
    when something needs to happen. This timer can, simultaneously, be set
    with much higher resolution and to a much longer interval than the
    regular clock tick.
    
    Eliminating jiffies is a little tricky, since a great deal of code
    makes use of it. A quick grep for jiffies the 2.4.3 source turns up
    over 3700 references. The variable needs to go, since there isn't a
    nice, regular clock tick to keep it updated. But fixing that many
    places in the source just does not sound like a whole lot of fun. For
    those of you who are into the details, the IBM S/390 fix looks like:
   #define jiffies ({ \
           uint64_t __ticks; \
           asm ("STCK %0" : "=m" (__ticks) ); \
           __ticks = (__ticks - init_timer_cc) >> 12; \
           do_div(__ticks, (1000000/HZ)); \
           ((unsigned long) __ticks); \
   })
 
    Essentially, every reference to jiffies gets turned into a read of the
    real-time clock. Since every access to jiffies (except one) is a read,
    this technique works - for the IBM architecture, which has relatively
    new and clean code.
    
    This approach fixes almost all of the problems with the old scheme.
    The regular timer interrupts, along with their overhead, is gone. The
    timer on most systems can be programmed with great precision, meaning
    that very high resolution timers can be supported. That will make
    certain types of processes (MIDI sequencers, software modem drivers,
    high-speed video, etc.) run far better. And process accounting, done
    when the process reschedules, will be extremely accurate.
    
    The change is not without its costs, though. The code changes are
    significant, of course, meaning that this change is a 2.5 item. A
    certain amount of extra overhead will need to be added to system calls
    to keep everything updated in the absence of a timer tick. If not done
    carefully, this overhead could outweigh the savings on normal systems
    (which do not run 1000 independent Linux images...). There is also
    some overhead added to the scheduler.
    
    In fact, George Anzinger, one of the developers behind the [25]high
    resolution timers project, posted [26]a message stating that the
    project had decided to avoid the no-tick approach due to the cost of
    that extra overhead. They seem willing to reconsider, though. The
    advantages of this approach seem to be strong; we may well see it
    adopted in the 2.5 development series.
    
    CML2 1.0 released. Eric Raymond has [27]announced the 1.0 release of
    CML2, the new kernel configuration system. The announcement talks
    about the plans for integrating CML2 into the 2.5 development series,
    and provides a lengthy discussion on why CML2 is better. (See also
    [28]last week's LWN kernel page for a discussion of the new kernel
    build system as a whole).
    
    Kernel summit webcast available. As LWN readers are probably tired of
    hearing, the [29]Linux 2.5 Kernel Summit was held on March 30 and 31.
    The presentations at the summit were videotaped, and they are now
    [30]available in RealPlayer format from the OSDN web site.
    
    Toward a security module interface. One of the conclusions that came
    out of the Kernel Summit was that the various groups working on
    security enhancements to Linux should agree on a standard interface.
    In that way, the projects could interoperate, and it would be easy to
    switch from one approach to another. To that end, Crispin Cowan has
    [31]announced the creation of the "security module" mailing list. The
    purpose of the list is to explore the enhancement of the kernel module
    interface to support the development of pluggable security modules.
    Those who are interested in the topic are encouraged to sign up;
    subscription instructions are in the announcement.
    
    Other patches and updates released this week include:
    
      * Romain Dolbeau has posted [32]a framebuffer driver for the
        Permedia3 chipset.
      * Jeff Dike has [33]released a version of user-mode Linux for the
        2.4.3 kernel.
      * Daniel Phillips has posted [34]a document describing the on-disk
        format of his ext2 directory indexes.
      * Maneesh Soni [35]posted a patch which improves the performance of
        file descriptor management on SMP systems.
      * Justin Gibbs [36]released version 6.1.11 of the aic7xxx driver.
      * Andre Hedrick [37]posted an IDE driver patch which provides
        support for the Promise Ultra100 TX2 chipset.
      * LVM 0.9.1 was [38]released by Heinz J. Mauelshagen.
      * Version 0.1.1 of the device registry patch (which provides a
        database of all physical devices on the system) has been
        [39]posted by Tim Jansen.
        
    Section Editor: [40]Jonathan Corbet
    April 12, 2001
    
    For other kernel news, see:
      * [41]Kernelnotes
      * [42]Kernel traffic
      * [43]Kernel Newsflash
      * [44]Kernel Trap
    
    Other resources:
      * [45]Kernel Source Reference
      * [46]L-K mailing list FAQ
      * [47]Linux-MM
      * [48]Linux Scalability Project
      * [49]Kernel Newbies
    
    
    
                                                   [50]Next: Distributions
    
    [51]Eklektix, Inc. Linux powered! Copyright Л 2001 [52]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/0412/
    4. http://lwn.net/2001/0412/security.php3
    5. http://lwn.net/2001/0412/dists.php3
    6. http://lwn.net/2001/0412/desktop.php3
    7. http://lwn.net/2001/0412/devel.php3
    8. http://lwn.net/2001/0412/commerce.php3
    9. http://lwn.net/2001/0412/press.php3
   10. http://lwn.net/2001/0412/announce.php3
   11. http://lwn.net/2001/0412/history.php3
   12. http://lwn.net/2001/0412/letters.php3
   13. http://lwn.net/2001/0412/bigpage.php3
   14. http://lwn.net/2001/0405/kernel.php3
   15. http://lwn.net/2001/0412/a/2.4.4pre2.php3
   16. http://lwn.net/2001/0412/a/2.4.3ac4.php3
   17. http://user-mode-linux.sourceforge.net/
   18. http://lwn.net/2001/0215/kernel.php3
   19. http://lwn.net/2001/0412/a/rw_semaphores.php3
   20. http://lwn.net/2001/0412/a/386-semaphores.php3
   21. http://lwn.net/2001/0412/a/corruption.php3
   22. http://lwn.net/2001/0412/a/lvm-fix.php3
   23. http://lwn.net/2001/0412/a/oom-patch.php3
   24. http://lwn.net/2001/0412/a/ibm-timer.php3
   25. http://high-res-timers.sourceforge.net/
   26. http://lwn.net/2001/0412/a/hrt.php3
   27. http://lwn.net/2001/0412/a/cml2-1.0.php3
   28. http://lwn.net/2001/0405/kernel.php3
   29. http://lwn.net/2001/features/KernelSummit/
   30. http://www.osdn.com/conferences/kernel/
   31. http://lwn.net/2001/0412/a/security-module.php3
   32. http://lwn.net/2001/0412/a/permedia.php3
   33. http://lwn.net/2001/0412/a/user-mode.php3
   34. http://lwn.net/2001/0412/a/index-format.php3
   35. http://lwn.net/2001/0412/a/fd-management.php3
   36. http://lwn.net/2001/0412/a/aic7xxx.php3
   37. http://lwn.net/2001/0412/a/promise.php3
   38. http://lwn.net/2001/0412/a/lvm.php3
   39. http://lwn.net/2001/0412/a/device-registry.php3
   40. mailto:lwn@lwn.net
   41. http://www.kernelnotes.org/
   42. http://kt.zork.net/
   43. http://www.atnf.csiro.au/~rgooch/linux/docs/kernel-newsflash.html
   44. http://www.kerneltrap.com/
   45. http://lksr.org/
   46. http://www.tux.org/lkml/
   47. http://www.linux.eu.org/Linux-MM/
   48. http://www.citi.umich.edu/projects/linux-scalability/
   49. http://www.kernelnewbies.org/
   50. http://lwn.net/2001/0412/dists.php3
   51. http://www.eklektix.com/
   52. http://www.eklektix.com/
 
 --- ifmail v.2.14.os7-aks1
  * Origin: Unknown (2:4615/71.10@fidonet)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 URL: http://lwn.net/2001/0412/kernel.php3   Sergey Lentsov   12 Apr 2001 17:11:09 
Архивное /ru.linux/20308d8af6837.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional