mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Witbrodt <dawitbro@sbcglobal.net>
To: linux-kernel@vger.kernel.org
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: HPET regression in 2.6.26 versus 2.6.25 -- RCU problem
Date: Fri, 8 Aug 2008 18:23:52 -0700 (PDT)	[thread overview]
Message-ID: <506429.22669.qm@web82107.mail.mud.yahoo.com> (raw)

I have tracked the regression down to an RCU problem.

I added some printk()'s to the function inet_register_protosw() in
net/ipv4/af_inet.c, as seen in this diff:

===== BEGIN DIFF ==========
      * non-permanent entry.  This means that when we remove this entry, the
      * system automatically returns to the old behavior.
      */
+    printk ("     Adding new protocol\n");
     list_add_rcu(&p->list, last_perm);
+
 out:
+    printk ("     Unlocking spinlock\n");
     spin_unlock_bh(&inetsw_lock);
 
+    printk ("     Calling synchronize_net()\n");
     synchronize_net();
 
     return;
===== END DIFF ==========

A kernel built with these changes freezes with "Calling synchronize_net()"
as the last printed line.

I located the function synchronize_net() in net/core/dev.c, and it was easy
to add some printk()'s there:

===== BEGIN DIFF ==========
 
void synchronize_net(void)
 {
+    printk ("   synchronize_net(): calling might_sleep()\n");
     might_sleep();
+
+    printk ("   synchronize_net(): calling synchronize_rcu()\n");
     synchronize_rcu();
 }
===== END DIFF ==========

The kernel built with these changes froze with "synchronize_net(): 
calling synchronize_rcu()" as the last line on the screen.

After reading some documentation in Documentation/RCU/, it looks like 
something is misusing RCU -- and, according to the Documentation, those kinds 
of mistakes are easy to make.  Maybe necessary calls to
 
    rcu_read_lock()
    rcu_read_unlock()

are missing, and something about my hardware is triggering a freeze that 
doesn't occur on most hardware.


For some reason, turning off the HPET by booting with "hpet=disabled" keeps
the freeze from happening.  Just reading a couple of those docs about RCU
made me dizzy, so I hope someone familiar with RCU issues will take a look
at the code in the files I've listed.  Surely you guys can take it from here
now?!

If not, just give me some experimental code changes to make to get my 2.6.26
and 2.6.27 kernels working again without disabling HPET!!!


Thanks,
Dave Witbrodt

             reply	other threads:[~2008-08-09  1:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09  1:23 David Witbrodt [this message]
2008-08-09  7:34 ` Peter Zijlstra
2008-08-09 12:39 David Witbrodt
2008-08-09 13:56 ` Paul E. McKenney
2008-08-11 11:25   ` Ingo Molnar
2008-08-11 16:15     ` Yinghai Lu
2008-08-09 22:35 David Witbrodt
2008-08-10 15:15 ` Paul E. McKenney
2008-08-11 18:01 David Witbrodt
2008-08-11 18:08 ` Yinghai Lu
2008-08-11 19:05 David Witbrodt
2008-08-12 15:17 David Witbrodt
2008-08-12 16:03 ` Ray Lee
2008-08-12 17:29 David Witbrodt
2008-08-12 17:38 ` Ray Lee
2008-08-12 18:59 David Witbrodt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=506429.22669.qm@web82107.mail.mud.yahoo.com \
    --to=dawitbro@sbcglobal.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome