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
Date: Fri, 8 Aug 2008 15:48:56 -0700 (PDT) [thread overview]
Message-ID: <17912.65177.qm@web82104.mail.mud.yahoo.com> (raw)
OK, suffering from insomnia this morning, I added printk()'s to
net/ipv4/af_inet.c in order to find the code where the freeze
happens. One of 2 loops was the culprit:
===== BEGIN CODE =======================
#ifdef CONFIG_IP_MULTICAST
if (inet_add_protocol(&igmp_protocol, IPPROTO_IGMP) < 0)
printk(KERN_CRIT "inet_init: Cannot add IGMP protocol\n");
#endif
/* Register the socket-side information for inet_create. */
for (r = &inetsw[0]; r < &inetsw[SOCK_MAX]; ++r)
INIT_LIST_HEAD(r);
for (q = inetsw_array; q < &inetsw_array[INETSW_ARRAY_LEN]; ++q)
inet_register_protosw(q);
/*
* Set the ARP module up
*/
===== END CODE =======================
Feeling better, I tried to get a few hours of sleep before I had to
go to work.
Knowing where to focus more attention, I restored the original version
of af_inet.c from the git tree with
git show HEAD:net/ivp4/af_inet.c
and then made the following changes to discover which loop was
the problem:
===== BEGIN DIFF ========================
#ifdef CONFIG_IP_MULTICAST
if (inet_add_protocol(&igmp_protocol, IPPROTO_IGMP) < 0)
printk(KERN_CRIT "inet_init: Cannot add IGMP protocol\n");
#endif
+ printk(" First loop:\n");
+ printk(" SOCK_MAX = %d\n", SOCK_MAX);
+ int dwindex=0;
/* Register the socket-side information for inet_create. */
for (r = &inetsw[0]; r < &inetsw[SOCK_MAX]; ++r)
+ {
+ printk(" initializing: &inetsw[%d] = %p\n", dwindex, r);
INIT_LIST_HEAD(r);
+ ++dwindex;
+ }
+ printk(" Second loop:\n");
+ printk(" INETSW_ARRAY_LEN = %d\n", INETSW_ARRAY_LEN);
+ printk(" Initial q = %p\n", inetsw_array);
+ printk(" Final q = %p\n", &inetsw_array[INETSW_ARRAY_LEN]);
+ dwindex=0;
for (q = inetsw_array; q < &inetsw_array[INETSW_ARRAY_LEN]; ++q)
+ {
+ printk(" initializing: &q[%d]\n", dwindex);
inet_register_protosw(q);
+ ++dwindex;
+ }
/*
* Set the ARP module up
*/
===== END DIFF ========================
I then built the kernel, installed it, and rebooted. The following
output was observed:
===== BEGIN OUTPUT ========================
...
NET: Registered protocol family 2
First loop:
SOCK_MAX = 11
initializing: &initsw[0] = ffffffff809c8460
initializing: &initsw[1] = ffffffff809c8470
initializing: &initsw[2] = ffffffff809c8480
initializing: &initsw[3] = ffffffff809c8490
initializing: &initsw[4] = ffffffff809c84a0
initializing: &initsw[5] = ffffffff809c84b0
initializing: &initsw[6] = ffffffff809c84c0
initializing: &initsw[7] = ffffffff809c84d0
initializing: &initsw[8] = ffffffff809c84e0
initializing: &initsw[9] = ffffffff809c84f0
initializing: &initsw[10] = ffffffff809c8500
Second loop:
INETSW_ARRAY_LEN = 3
Initial q = ffffffff806f8a20
Final q = ffffffff806f8a60
initializing: &q[0]
===== END OUTPUT ========================
This is where my kernels (2.6.26* and 2.6.27*) are freezing, in
the call of inet_register_protosw().
As I find time, I will keep trying to dig deeper. Hopefully one
of you on the LKML has an idea of what's wrong, because even
though I am familiar with C and C++ I have no background at all
with Linux kernel code itself.
Dave W.
next reply other threads:[~2008-08-08 22:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 22:48 David Witbrodt [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-08 10:32 HPET regression in 2.6.26 versus 2.6.25 David Witbrodt
2008-08-06 4:45 David Witbrodt
2008-08-05 22:16 David Witbrodt
2008-08-05 21:12 David Witbrodt
2008-08-05 14:14 David Witbrodt
2008-08-05 19:19 ` Yinghai Lu
2008-08-04 23:57 David Witbrodt
2008-08-05 13:58 ` Peter Zijlstra
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=17912.65177.qm@web82104.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