<?xml version="1.0" ?>

<kc>

<title>Kernel Traffic</title>

<author contact="mailto:zbrown@tumblerings.org">Zack Brown</author>

<issue num="46" date="13 Dec 1999 00:00:00 -0800" />

<stats posts="879" size="3501" contrib="339" multiples="141" lastweek="152">

<person posts="51" size="146" who="Alan Cox " />
<person posts="28" size="163" who="Andrea Arcangeli " />
<person posts="23" size="79" who="Tigran Aivazian " />
<person posts="22" size="91" who="Alexander Viro " />
<person posts="18" size="74" who="Ingo Molnar " />
<person posts="18" size="66" who="Chris Wing " />
<person posts="17" size="88" who="Pavel Machek " />
<person posts="17" size="64" who="Jamie Lokier " />
<person posts="15" size="65" who="James Simmons " />
<person posts="12" size="66" who="Martin Mares " />
<person posts="12" size="63" who="Richard B. Johnson " />
<person posts="11" size="35" who="Stephen C. Tweedie " />
<person posts="11" size="34" who="Richard Gooch " />
<person posts="10" size="46" who="Egbert Eich " />
<person posts="10" size="39" who="=?iso-8859-1?Q?Fran=E7ois=20D=E9sarm=E9nien?= " />
<person posts="10" size="32" who="Jeff Garzik " />
<person posts="9" size="37" who="Sergey Kubushin " />
<person posts="9" size="36" who="David Wragg " />
<person posts="8" size="37" who="Mike Galbraith " />
<person posts="8" size="30" who="Jakub Jelinek " />
<person posts="7" size="25" who="Benno Senoner " />
<person posts="6" size="30" who="Jan Kara " />
<person posts="6" size="20" who="Linux Lists " />
<person posts="6" size="20" who="Andi Kleen " />
<person posts="6" size="19" who="Johannes Erdfelt " />
<person posts="6" size="18" who="Matti Aarnio " />
<person posts="6" size="17" who="Jens Axboe " />
<person posts="6" size="15" who="Tim Waugh " />
<person posts="5" size="24" who="Andrei Pitis " />
<person posts="5" size="19" who="Bret Indrelee " />
<person posts="5" size="19" who="Mr. James W. Laferriere " />
<person posts="5" size="18" who="Manfred Spraul " />
<person posts="5" size="15" who="David Schwartz " />
<person posts="5" size="14" who="Borislav Deianov " />
<person posts="4" size="30" who="George R. Kasica " />
<person posts="4" size="26" who="Martin Dalecki " />
<person posts="4" size="23" who="Robert Dinse " />
<person posts="4" size="20" who="Gregoire FAVRE " />
<person posts="4" size="20" who="Jeremy Fitzhardinge " />
<person posts="4" size="18" who="Turbo Fredriksson " />
<person posts="4" size="17" who="" />
<person posts="4" size="16" who="Mike Coleman " />
<person posts="4" size="15" who="Gabor Lenart " />
<person posts="4" size="14" who="Khimenko Victor " />
<person posts="4" size="14" who="Marc Lehmann " />
<person posts="4" size="14" who="Brandon S. Allbery KF8NH " />
<person posts="4" size="13" who="Benjamin C.R. LaHaise " />
<person posts="4" size="13" who="Daniel Roesen " />
<person posts="4" size="13" who="Ville Herva " />
<person posts="4" size="12" who="Andreas Schuldei " />
<person posts="4" size="12" who="David Howells " />
<person posts="4" size="12" who="Thomas Molina " />
<person posts="4" size="11" who="Thomas Davis " />
<person posts="4" size="10" who="Chmouel Boudjnah " />
<person posts="4" size="8" who="Karel Kulhavy " />
<person posts="3" size="20" who="Petr Vandrovec Ing. VTEI " />
<person posts="3" size="15" who="Daniel Kobras " />
<person posts="3" size="14" who="" />
<person posts="3" size="14" who="Oliver Neukum " />
<person posts="3" size="14" who="H . J . Lu " />
<person posts="3" size="13" who="Oleg Drokin " />
<person posts="3" size="13" who="Sherwin Notario " />
<person posts="3" size="12" who="Iusty Pop Daniel " />
<person posts="3" size="12" who="Guest section DW " />
<person posts="3" size="11" who="Jean Tourrilhes " />
<person posts="3" size="11" who="Dominik Kubla " />
<person posts="3" size="11" who="Linus Torvalds " />
<person posts="3" size="10" who="Frank Bernard " />
<person posts="3" size="10" who="Gerard Roudier " />
<person posts="3" size="10" who="Adam J. Richter " />
<person posts="3" size="10" who="Kevin Fenzi " />
<person posts="3" size="10" who="Peter Samuelson " />
<person posts="3" size="10" who="Robert Cohen " />
<person posts="3" size="9" who="Peter T. Breuer " />
<person posts="3" size="9" who="" />
<person posts="3" size="9" who="Daniel Stone " />
<person posts="3" size="8" who="teunis " />
<person posts="3" size="7" who="" />
<person posts="3" size="7" who="" />
<person posts="3" size="7" who="" />
<person posts="3" size="7" who="Jeffrey B. Siegal " />
<person posts="3" size="6" who="wu_yb " />
<person posts="2" size="48" who="Chuck Lever " />
<person posts="2" size="21" who="Paul Rusty Russell " />
<person posts="2" size="18" who="Charles Wilkins " />
<person posts="2" size="15" who="Ferdinand Prantl " />
<person posts="2" size="14" who="Eric Lowe " />
<person posts="2" size="14" who="Callum Lerwick " />
<person posts="2" size="14" who="Alexandre Hautequest " />
<person posts="2" size="12" who="Tim Walberg " />
<person posts="2" size="12" who="Wakko Warner " />
<person posts="2" size="11" who="Pete Zaitcev " />
<person posts="2" size="11" who="Malcolm Beattie " />
<person posts="2" size="10" who=" (Tom M. Kroeger)" />
<person posts="2" size="10" who="Sameer " />
<person posts="2" size="9" who="Neil Brown " />
<person posts="2" size="9" who="David desJardins " />
<person posts="2" size="9" who="Geert Uytterhoeven " />
<person posts="2" size="9" who="Brion Vibber " />
<person posts="2" size="9" who="Larry Woodman " />
<person posts="2" size="9" who="Andrey Panin " />
<person posts="2" size="9" who="Wolfgang Walter " />
<person posts="2" size="8" who="Rik van Riel " />
<person posts="2" size="8" who="Doug Ledford " />
<person posts="2" size="8" who="Sumner, Jeff " />
<person posts="2" size="8" who="David Woodhouse " />
<person posts="2" size="8" who="Mark O'Neill " />
<person posts="2" size="7" who="Jason T Collins " />
<person posts="2" size="7" who="John Kacur " />
<person posts="2" size="7" who="Martin Mares " />
<person posts="2" size="7" who=" (Greg KH)" />
<person posts="2" size="7" who="Riley Williams " />
<person posts="2" size="7" who="Christoph Rohland " />
<person posts="2" size="6" who="pramodh mallipatna " />
<person posts="2" size="6" who="George " />
<person posts="2" size="6" who="Ph. Marek " />
<person posts="2" size="6" who="Jim Woodward " />
<person posts="2" size="6" who="Lars Marowsky-Bree " />
<person posts="2" size="6" who="Stephan van Hienen " />
<person posts="2" size="6" who="Terry Katz " />
<person posts="2" size="6" who="Yasuhide OOMORI " />
<person posts="2" size="6" who="" />
<person posts="2" size="6" who="Matan Ziv-Av " />
<person posts="2" size="5" who="Ken Ken " />
<person posts="2" size="5" who="Trond Myklebust " />
<person posts="2" size="5" who="Curtis M. Brune " />
<person posts="2" size="5" who="Bjorn Wesen " />
<person posts="2" size="5" who="Norbert Bramhoff " />
<person posts="2" size="5" who=" (Chris Hirsch )" />
<person posts="2" size="5" who="Andrzej Krzysztofowicz " />
<person posts="2" size="5" who="Fusti Andras " />
<person posts="2" size="5" who="Raju K V " />
<person posts="2" size="5" who="Gregory Maxwell " />
<person posts="2" size="5" who="DAVID BALAZIC " />
<person posts="2" size="5" who="Mark Hahn " />
<person posts="2" size="5" who="TenThumbs " />
<person posts="2" size="5" who="Martijn van Oosterhout " />
<person posts="2" size="5" who="Hua Jiang " />
<person posts="2" size="5" who="Aamir Shaikh " />
<person posts="2" size="4" who="Albert D. Cahalan " />
<person posts="2" size="4" who="Dan Hollis " />
<person posts="1" size="21" who="John Summerfield " />
<person posts="1" size="14" who="Marcus Watts " />
<person posts="1" size="12" who="Ulrich Windl " />
<person posts="1" size="11" who="" />
<person posts="1" size="10" who="Charlie Hedlin " />
<person posts="1" size="8" who="Robert Louis Murphy " />
<person posts="1" size="8" who="Otto Meier " />
<person posts="1" size="8" who="Serge Robyns " />
<person posts="1" size="8" who="Peter Rival " />
<person posts="1" size="7" who="Peter Blomgren " />
<person posts="1" size="7" who="Vladimir Litovka " />
<person posts="1" size="7" who="Alan Curry " />
<person posts="1" size="6" who="Jose Dapena Paz " />
<person posts="1" size="6" who="Ben LaHaise " />
<person posts="1" size="6" who="Johannes Kloos " />
<person posts="1" size="5" who="Sean McNeil " />
<person posts="1" size="5" who="Hans Reiser " />
<person posts="1" size="5" who="Thomas Graichen " />
<person posts="1" size="5" who=" (H.J. Lu)" />
<person posts="1" size="5" who=" (Scott Lurndal)" />
<person posts="1" size="4" who="" />
<person posts="1" size="4" who="Russell King " />
<person posts="1" size="4" who="Gregory P. Smith " />
<person posts="1" size="4" who="Andreas Jaeger " />
<person posts="1" size="4" who="Peter Riocreux " />
<person posts="1" size="4" who="Nicolas Pitre " />
<person posts="1" size="4" who="Barrie Spence " />
<person posts="1" size="4" who="Nerijus " />
<person posts="1" size="4" who="andrew deryabin " />
<person posts="1" size="4" who="Petr Vandrovec " />
<person posts="1" size="4" who=" (Simon Patience)" />
<person posts="1" size="4" who="Keith Owens " />
<person posts="1" size="4" who="Harald Koenig " />
<person posts="1" size="4" who="Jan Echternach " />
<person posts="1" size="4" who="Soohoon Lee " />
<person posts="1" size="4" who="Artur Skawina " />
<person posts="1" size="4" who="Don Rolph " />
<person posts="1" size="4" who="Douglas Gilbert " />
<person posts="1" size="4" who="Gabriel Paubert " />
<person posts="1" size="4" who="Wolfram Pienkoss " />
<person posts="1" size="4" who="Thomas E. Dodd /CSDC " />
<person posts="1" size="4" who="Jaroslav Kysela " />
<person posts="1" size="4" who="Russell King - ARM Linux Admin " />
<person posts="1" size="3" who="James Manning " />
<person posts="1" size="3" who="Andreas Steffan " />
<person posts="1" size="3" who="Anil Kumar S R " />
<person posts="1" size="3" who="Kurt Garloff " />
<person posts="1" size="3" who="Erik Mouw " />
<person posts="1" size="3" who="Matthew Vanecek " />
<person posts="1" size="3" who="Ingo Oeser " />
<person posts="1" size="3" who="Roman Zippel " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Colin Ngam " />
<person posts="1" size="3" who="John Kennedy " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Manfred " />
<person posts="1" size="3" who="Michael Meskes " />
<person posts="1" size="3" who="Steven N. Hirsch " />
<person posts="1" size="3" who="Jonathan Brauer " />
<person posts="1" size="3" who="Theodore Y. Ts'o " />
<person posts="1" size="3" who="Mathiasen, Torben " />
<person posts="1" size="3" who="Piotr Wilkin " />
<person posts="1" size="3" who="stef " />
<person posts="1" size="3" who="Richard Adams " />
<person posts="1" size="3" who="Christian G Denis " />
<person posts="1" size="3" who="Dale Harris " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Joel Jaeggli " />
<person posts="1" size="3" who="Richard Dynes " />
<person posts="1" size="3" who="Jan Kara " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Dag Brattli " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Richard Gooch " />
<person posts="1" size="3" who="Brian Capouch " />
<person posts="1" size="3" who="Homme R. Bitter " />
<person posts="1" size="3" who="Brian Gerst " />
<person posts="1" size="3" who="Markus L. Noga " />
<person posts="1" size="3" who="B. D. Elliott " />
<person posts="1" size="3" who="Jakma, Paul " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Roger Gammans " />
<person posts="1" size="3" who="Karim Yaghmour " />
<person posts="1" size="3" who="Drew Bertola " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Andre Hedrick " />
<person posts="1" size="3" who="Heinz Mauelshagen " />
<person posts="1" size="3" who="Kendall Bennett " />
<person posts="1" size="3" who="Javier Kohen " />
<person posts="1" size="3" who="Turbo Fredriksson " />
<person posts="1" size="3" who="Jim Nance " />
<person posts="1" size="3" who="Andreas Schwab " />
<person posts="1" size="3" who="Dimitris Michailidis " />
<person posts="1" size="3" who="David S. Miller " />
<person posts="1" size="3" who="Frank v Waveren " />
<person posts="1" size="3" who="Brandon Anderson " />
<person posts="1" size="3" who="Allen Brown " />
<person posts="1" size="3" who="Daniel Wirth " />
<person posts="1" size="3" who=" (Kevin Buhr)" />
<person posts="1" size="3" who="Egbert Eich " />
<person posts="1" size="3" who="Dunlap, Randy " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who=" (Rogier Wolff)" />
<person posts="1" size="3" who="Vinuthananda Bindingnavile (CTS) " />
<person posts="1" size="3" who="Vinuthananda B. (CTS) " />
<person posts="1" size="3" who="Matthew Harrell " />
<person posts="1" size="3" who="Rui Sousa " />
<person posts="1" size="3" who=" (Mail Delivery System)" />
<person posts="1" size="3" who="casler, heather " />
<person posts="1" size="3" who="Marcelo Tosatti " />
<person posts="1" size="3" who="Alan Cox " />
<person posts="1" size="3" who="Ludovic LANGE " />
<person posts="1" size="3" who="Martin v. Loewis " />
<person posts="1" size="3" who="Theodore Y. Ts'o " />
<person posts="1" size="3" who="Jes Sorensen " />
<person posts="1" size="3" who="fbujanic " />
<person posts="1" size="3" who="Ard van Breemen " />
<person posts="1" size="3" who="Erich Boleyn " />
<person posts="1" size="3" who="Donnchadh =?iso-8859-1?Q?=D3=20Donnabh=E1in?= " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Philippe Troin " />
<person posts="1" size="3" who="Josef =?iso-8859-1?Q?H=F6=F6k?= " />
<person posts="1" size="3" who="" />
<person posts="1" size="3" who="Sean Hunter " />
<person posts="1" size="3" who="Ragnar Hojland Espinosa " />
<person posts="1" size="3" who="Doug Alcorn " />
<person posts="1" size="3" who="lars brinkhoff " />
<person posts="1" size="3" who="Uwe Bonnes " />
<person posts="1" size="3" who="Jens Benecke " />
<person posts="1" size="2" who="Ingo Molnar " />
<person posts="1" size="2" who=" (Arjan van de Ven)" />
<person posts="1" size="2" who="Chris Noe " />
<person posts="1" size="2" who="Richard Zidlicky " />
<person posts="1" size="2" who="Bruno Haible " />
<person posts="1" size="2" who="Ben Collins " />
<person posts="1" size="2" who="Steffen Ullrich " />
<person posts="1" size="2" who="imel... " />
<person posts="1" size="2" who="Jene S Quois " />
<person posts="1" size="2" who="Administracao " />
<person posts="1" size="2" who="Matthias Riese " />
<person posts="1" size="2" who="Michal Ostrowski " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Jones D (ISaCS) " />
<person posts="1" size="2" who="Glenn Burkhardt " />
<person posts="1" size="2" who="=?iso-8859-1?Q?Mika_Penttil=E4?= " />
<person posts="1" size="2" who="ilan Bloch " />
<person posts="1" size="2" who="Adam D. Bradley " />
<person posts="1" size="2" who="Alan Watson " />
<person posts="1" size="2" who="Thomas Sailer " />
<person posts="1" size="2" who="Matthias Andree " />
<person posts="1" size="2" who="Helge Hafting " />
<person posts="1" size="2" who="prakash " />
<person posts="1" size="2" who="Jason Gunthorpe " />
<person posts="1" size="2" who="Thierry Danis " />
<person posts="1" size="2" who="Stephen Frost " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who=" (Ton Hospel)" />
<person posts="1" size="2" who="Carlos Carvalho " />
<person posts="1" size="2" who="Michael Elizabeth Chastain " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Khimenko Victor " />
<person posts="1" size="2" who="Taso Hatzi " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Timo Ketola " />
<person posts="1" size="2" who="Victor STANESCU " />
<person posts="1" size="2" who="Artur Downar " />
<person posts="1" size="2" who="David McWherter " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Mike Karmyshev " />
<person posts="1" size="2" who="John Sanabria " />
<person posts="1" size="2" who="Ron Flory " />
<person posts="1" size="2" who="Lech Szychowski " />
<person posts="1" size="2" who="BOSZORMENYI Zoltan " />
<person posts="1" size="2" who="Frank van Maarseveen " />
<person posts="1" size="2" who="Srdjan Sobajic " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Walter Hofmann " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Garst R. Reese " />
<person posts="1" size="2" who="Karl Kiniger " />
<person posts="1" size="2" who="Trond Hasle Amundsen " />
<person posts="1" size="2" who="S . Arun " />
<person posts="1" size="2" who="M Carling " />
<person posts="1" size="2" who="Joey Hess " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Peter Bell " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Happy " />
<person posts="1" size="2" who="Robert Brooks " />
<person posts="1" size="2" who="Aschwin van der Woude " />
<person posts="1" size="2" who="" />
<person posts="1" size="2" who="Michael Rozhavsky " />
<person posts="1" size="2" who="root " />
<person posts="1" size="1" who="" />

</stats>

<section
  title="Google Bug Hunt"
  subject="Frequent oops in shrink_mmap"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_9911_03/msg00491.html"
  posts="10"
  startdate="17 Nov 1999 00:00:00 -0800"
  enddate="30 Nov 1999 00:00:00 -0800"
>

<mention>Andrea Arcangeli</mention>
<mention>Rik van Riel</mention>

<p>David desJardins of Google reported a problem on their cluster. He said:</p>

<quote who="David desJardins">

<p>Google runs on a
cluster of 2000+ Linux/Intel machines. We have a problem on several of those
machines, a symptom of which is kernel oops messages in try_to_free_buffers,
called from shrink_mmap. (The machines which have these kernel oops messages
tend to have poor performance in general, even at times when the oops aren't
being generated.)</p>

<p>We are currently running 2.2.7 on these machines, but I see from searching
linux-kernel traffic that the problem of kernel oops in shrink_mmap is a
long-standing one which has been reported in many different kernel versions,
up to at least 2.2.12, and has also been reported in Linux/Alpha. I've
looked at all of the past archives, and I didn't see any definitive response
to these problems.</p>

<p>The problem is probably related to heavy disk use and/or heavy network
traffic and/or heavy parallel processing with threads. These are the
circumstances under which we tend to see the problem, and also are
circumstances that I see correlated with past reports of this problem.</p>

<p>I have 56 of these oops messages from 10 different machines, all at exactly
the same location. I've attached a sample at the end of this note. Most of
them look very similar (to each other, and to other oops messages previously
posted to this list). But I would be happy to forward all of them to anyone
who can use them. I could collect even more if that would be helpful.</p>

<p>It's possible that the problem is associated with or caused by a hardware
problem. Out of thousands of machines, we could easily have 10 with some
specific problem. But I don't really know what kind of a problem, or why it
would manifest itself only in this particular way. Also, the fact that the
same problem occurs in Linux/Alpha makes me suspect some sort of software
flaw.</p>

</quote>

<p>Rik van Riel started thinking about where the bug was most likely to be, but
Stephen C. Tweedie pointed out that if the oopsing machines also had poor
performance in general as David had said, the problem could very well be in
the hardware. Analyzing David's code dump, he added, <quote who="Stephen C.
Tweedie">the immediate problem is that there is a
page in the page map which has a page_map-&gt;buffers pointer of 0x40000000.
That's one bit away from a legal value of zero. That sort of single-bit
error is usually a sign of hardware trouble. It's not guaranteed, but that's
the best diagnosis just from looking at one dump.</quote> He added,
<quote who="Stephen C. Tweedie">And yes, depending on
your usage patterns it is *entirely* plausible for random one-bit memory
corruptions to show up in the same place on a number of different machines,
if that happens to be where we stress the kernel most. I've seen similar
random memory problems on a different machine which repeatably oopsed
somewhere else in the buffer cache, but it was definitely a memory fault and
only the load pattern caused it to repeat in the same part of the
code.</quote></p>

<p>David replied, <quote who="David desJardins">I looked
at 56 of these oops messages in try_to_free_buffers, from 10 machines. 50
messages (4 machines) have %eax=80000000, and 6 messages (6 machines) have
%eax=40000000. Is this consistent with the single-bit memory error, or
not?</quote> Andrea Arcangeli and Stephen replied that it was, and Stephen
added:</p>

<quote who="Stephen C. Tweedie">

<p>If there is a design
flaw on your motherboards, for example, such that the timing of the outside
signals on the bus is borderline, then this is exactly what you would see.
In cases like these it is always hard to determine absolutely for sure
whether it is hardware or software, but the fact that you see this on only a
fixed subset of otherwise identical machines argues strongly for hardware.</p>

<p>There is also the fact that the corruptions are coming from a statically
allocated area of memory which is simply never, ever used for kmalloc
allocations, and the vast, vast, vast majority of software-triggered memory
corruptions are due to accesses to memory which has been allocated
dynamically and then freed early. That just doesn't fit the pattern (and I
can see no way a corruption to the buffer ring links in a normal buffer head
could get propagated back to the static page array without triggering an
oops elsewhere).</p>

<p>My bet would still be on hardware.</p>

</quote>

<p>The thread ended there.</p>

</section>

<section
  title="Permissions On Doc Files"
  subject="unreadable doc files in kernel tarball"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_9911_04/msg00126.html"
  posts="7"
  startdate="23 Nov 1999 00:00:00 -0800"
  enddate="03 Dec 1999 00:00:00 -0800"
>

<mention>Peter Samuelson</mention>
<mention>Mike Coleman</mention>

<p>Joey Hess noticed that the permissions of
linux/Documentation/kernel-docs.txt and linux/Documentation/proc.txt in the
source tree were not world readable. Mike Coleman suggested that this be
changed, so all users of a system could read the kernel docs. But Peter
Samuelson replied that this would have no effect on the user actually
installing the sources; and other users would not be able to compile the
kernel from another user's archive in any case. Mike replied that since he
only let root write to /usr/src, he had to install the sources as root; at
the same time this would prevent any of his other accounts from reading
those files. Peter suggested that Mike use 'chmod' as part of his
installation process, and the thread ended.</p>

</section>

<section
  title="SMP Kernel On Single Processor Dell PowerEdge 1300"
  subject="SMP kernel with single processor ?"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_9911_04/msg00385.html"
  posts="10"
  startdate="25 Nov 1999 00:00:00 -0800"
  enddate="30 Nov 1999 00:00:00 -0800"
>
<topic>Disks: SCSI</topic>
<topic>PCI</topic>
<topic>SMP</topic>

<mention>Alan Cox</mention>

<p>Brad Larden had a Dell PowerEdge 1300 with a dual-processor motherboard,
fitted with only a single processor and a dummy in the extra space. He asked
if there were any problems using an SMP kernel on the machine. Victor
Khimenko replied, <quote who="Victor Khimenko">I'm
not know about Dell PowerEdge 1300 but I have Dell PowerEdge 2300 with
similar configuration and you MUST use SMP kernel there (even when there are
in fact just one processor unit installed). Reason ? APIC ... All external
PCI devices on Dell PowerEdge 2300 (I almost sure for PowerEdge 1300 this is
true as well) are using APIC-extended interrupts (Linux marks them as IRQ
20, IRQ 21, etc). So with UP kernel you simple will be unable to use your
hardware.</quote> But he added that in some rare circumstances, SMP kernels
could cause a problem, and in any case would be slightly slower than a UP
kernel. But he reiterated that with the hardware under discussion, there was
simply no choice. As a final piece of advice, he offered, <quote who="Victor
Khimenko">Check your /proc/interrupts file. If there
are APIC interrupts &gt; 15IRQ (last "normal" interrupt) listed as used for
something then you have the same situation as I am and SHOULD use SMP
kernel.</quote></p>

<p>Alan Cox replied that as far as he knew, UP kernels should be able to use
the hardware. He added that Intel designed the hardware to be able to boot
DOS. But Victor replied that DOS, Windows 95 and Windows NT would hang on
Dell PowerEdge 2300 when trying to access EtherExpress. Booting would go
fine, he said, as long as you did not try to use external devices.</p>

<p>Later, Brad reported, <quote who="Brad Larden">I am
now running a UP kernel on the Dell poweredge 1300. No problems, no crashes,
it talks to the u-beaut UW-whatever SCSI, talks to the Intel network card
and all.</quote></p>

</section>

<section
  title="Filesystem Corruption Hunt And Fix In Stable And Unstable Kernels"
  subject="[patch] FS (ext2) corruption generated by BLKFLSBUF/invalidate_buffers (2.2.x and 2.3.x)"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_9911_04/msg00503.html"
  posts="9"
  startdate="25 Nov 1999 00:00:00 -0800"
  enddate="01 Dec 1999 00:00:00 -0800"
>
<topic>FS: ext2</topic>
<topic>Ioctls</topic>

<mention>Alan Cox</mention>

<p>Andrea Arcangeli posted a patch (and gave a <a
href="ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.14pre7/buffer-races-2.2.14pre7.gz">pointer</a>
to it), and said:</p>

<quote who="Andrea Arcangeli">

<p>Jason and Samuel told
me they could reliable reproduce fs corruption by writing to a filesystem
while the ioctl(BLKFLSBUF) is running in parallel on the blockdevice where
the fs is mounted.</p>

<p>I understood what was going on: BLKFLSBUF is just an interface for
invalidate_buffers and invalidate_buffers() trashes away _all_ the buffers
beloging to such a blockdevice. _Dirty_ buffers included.</p>

<p>As hdparm is using such ioctl too so a simple:</p>

<p><tt>        cp /dev/zero /tmp<br />
        hdparm -t /dev/&lt;blockdevice_where_tmp_is_placed&gt;
</tt></p>

<p>can just corrupt the hd badly.</p>

<p>Actually the corruption is hided pretty well by both hdparm and the kernel
doing a sync on the device before starting invalidate_buffers.</p>

<p>The only two cases where we want invalidate_buffers() to flush away _also_
dirty buffers are:</p>

<p>

<ul>

<li>upon detected media change</li>

<li>releasing fdisk memory</li>

</ul>

</p>

<p>In all other cases where the kernel want to invalidate the buffers, it
should first sync the device (no need to wait I/O completation, so an
sync_buffers(dev, 0) is enough if no filesystem is mounted or
sync_dev(dev) if the filesystem is mounted) and then calling an
invalidate_buffers that won't trash dirty blocks. So if new dirty blocks
are generated under invalidate_buffers (legitimate in cases like
BLKFLSBUF), they won't be dropped.</p>

<p>In general we should _never_ drop dirty buffers. If we need to drop dirty
buffers (excluding the ramdisk case) it means we have some kind of fs
corruption going on.</p>

<p>This is my fix against 2.2.14pre7 (probably it won't apply to previous
kernel for unrelated but trivially fixable rejects).</p>

<p>The fix also includes my longstanding race fixes in
set_blocksize/invalidate_buffers and I also noticed that sync_dev is
generating dirty data via the qutoa code _after_ the last sync_buffers (and
so sync_dev right now can return with dirty data still present if quota is
running).</p>

<p>Please Jason could you confirm this my patch fixes the problem for your
reproducible fs corruption? I only given it a try on a floppy and worked
fine here.</p>

</quote>

<p>Jason T Collins reported that Andrea's patch fixed some of the corruption,
but not all of it. Instead of getting multifarious incomprehensible
warnings, the corruption now seemed restricted to a single repeatable
exploit. While running 2.2.14pre9 with Andrea's buffer-races-2.2.14pre7-2
patch applied, Jason started two seperate processes, each of which would do
a "create file", "delete file", and "BLKFLSBUF" on two files in the same
directory. This would cause corruption after a few seconds, as manifested by
a string of errors of the form, "EXT2-fs warning (device sd(8,1)):
ext2_free_blocks: bit already cleared for block 257682". This would not trip
the error flag for ext2, so he had to run fsck by hand each time to fix the
disk.</p>

<p>Andrea went back and found an error in his previous patch. He posted an
incremental correction, again with a <a
href="ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.14pre9/buffer-races-3.gz">pointer</a>
to it on the web.</p>

<p>Jason replied with complete success, saying, <quote who="Jason T
Collins">Yippee! That does it! I tried with 2 and 4 parallel processes each
for a half hour. Everything ran fine under the kernel with this patch where
it generated corruption in seconds before.</quote> Alan Cox replied to this,
asking if Andrea wanted him to roll the patch into 2.2.14pre10; Andrea
replied in the affirmative, and the thread was over.</p>

</section>

<section
  title="IRQ Timeouts And VESA Framebuffer"
  subject="fbcon + scrolling = irq timeouts?"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_9911_05/msg00064.html"
  posts="29"
  startdate="26 Nov 1999 00:00:00 -0800"
  enddate="02 Dec 1999 00:00:00 -0800"
>
<topic>Framebuffer</topic>

<mention>Alan Cox</mention>

<p>Ian Ehrenwald noticed some Interrupt Request (IRQ) timeouts while playing
MP3s and scrolling large text files in a VESA framebuffer console. He
couldn't find any hardware conflicts on his system, and asked for advice.
Alan Cox replied that VESA framebuffer used BIOS functions, which could lock
interrupts for a long time. Pavel Machek corrected him, saying that <quote
who="Pavel Machek">even if you don't use any bios functions (you do not
normally use any vesa bios functions at runtime!) you spend just too much
time in kernel space and mp3 player fails to meet that deadline.</quote> He
half-humorously suggested a few schedules() at strategical places in fbcon.
Alan approved that approach, there followed an implementation discussion.</p>

</section>

<section
  title="Dangerous Fixes To FAT And HPFS"
  subject="[CFT][PATCH] block_write_*_buffer rewrite"
  archive="http://kernelnotes.org/lnxlists/linux-kernel/lk_9911_05/msg00302.html"
  posts="10"
  startdate="30 Nov 1999 00:00:00 -0800"
  enddate="03 Dec 1999 00:00:00 -0800"
>
<topic>FS: FAT</topic>

<mention>Martin Dalecki</mention>
<mention>David S. Miller</mention>

<p>Alexander Viro posted an extensive patch to fs/buffer.c, to fix problems
with write-beyond-EOF on FAT and HPFS, and cleaned the code up as well. He
asked for testers, and added, <quote who="Alexander Viro">WARNING: IT'S ON THE CRITICAL PATH AND IF IT'S BROKEN IT
WILL EAT YOUR DATA. SILENTLY. EXTREME DANGER. USE ONLY ON SCRATCH
BOXEN.</quote></p>

<p>No one found any major flaws, but Martin Dalecki had some cosmetic
suggestions, and Ingo Molnar pointed out the Alexander had removed the
optimization that would overlap the issuing/finishing of read requests with
copying memory, on 1k filesystems. On smaller boxes, he said, this would
make a difference with overall system performance. He also pointed out a
deadlock that David S. Miller had noticed in the code some time before:
writing a file into a freshly mmap()-ed memory area, where the mmap-ed page
is the same as the written page. This would instantly freeze the process
(there was a bit of confusion on the list over this point, because Ingo had
originally said that the deadlock was caused by a read rather than a write.
He quickly corrected himself, and the discussion continued).</p>

<p>Ingo clarified, <quote who="Ingo Molnar">the problem
is generic_file_write() locking the page while generating a page fault (to
the same page).</quote> Alexander replied, <quote who="Alexander
Viro">Oh, fsck... It's even more interesting for
mutual deadlocks. And then there is a wonderful situation with writing into
mmaped area with offset 1 byte... Hrrrrrmmm... I wonder how well other
kernels handle that. The most obvious way would be to force page-in before
grabbing the destination page and to get_page() on (one or two) pages
containing the source. Messy.</quote></p>

<p>Less than a day later, Alexander replied again to Ingo's same post, with a
proposed fix. There was a bit of implementation discussion, but nothing
conclusive.</p>

</section>

</kc>
