From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: netdev@vger.kernel.org
Cc: "Amit S. Kale" <amitkale@linsyssoft.com>,
Mithlesh Thukral <mithlesh@linsyssoft.com>,
Vitaly Wool <vwool@ru.mvista.com>, Mark Huth <mhuth@mvista.com>
Subject: Re: [Kgdb-bugreport] [PATCH 2.6.20-rc7] 8139too KGDBoE fix
Date: Wed, 14 Mar 2007 17:04:40 +0300 [thread overview]
Message-ID: <45F800F8.5020903@ru.mvista.com> (raw)
In-Reply-To: <45F7FBC8.9050700@ru.mvista.com>
Hello, I wrote:
>> This thread came up on kgdb-bugreport mailing list. Could you please
>> suggest us what's the correct way of fixing this problem?
>> 1. When running a kgdb on RTL8139 ethernet interface: 8139too driver
>> prints too many "Out-of-sync dirty pointer" messages on console and
>> gdb can't connect to kgdb stub. These messages can be suppressed,
>> though it still results in connection failures frequently.
>> 2. Here is how kgdb uses polling mechanism for communication to gdb.
>> kgdb calls netpoll_set_trap(1) just before entering a loop where it
>> communicates to gdb. It calls netpoll_set_trap(0) after it is done and
>> wants to resume a kernel. The communication to gdb goes through
>> netpoll_poll (which calls kgdb rx_hook) and netpoll_send_udp functions.
>> 3. A queue for an interface may have been stopped by it's driver by
>> calling netif_stop_queue. After this if kgdb attempts to enter
>> communication with gdb, it'll call netpoll_set_trap(1), after which
>> the queue can't be started again. This is a potential deadlock
>> situation. Is there a way out of this?
>> 4. Is it necessary to call netpoll_set_trap(1) at all before entering
>> gdb communication loop? Even if a driver stops the queue in middle of
>> the communication netpoll_poll and netpoll_send_udp calls can recover
>> from that by calling driver's interrupt and poll routines. Is this a
>> valid statement?
> I'd like to return to this again (having received no feedback)...
> The idea is to change how CONFIG_NETPOLL_TRAP is implemented: instead of
> completely bypassing queue locking after netpoll_set_trap(1) has been
> called, how about we set and chack some other flag (internal to netpoll)
> telling it that the queue is frozen, i.e. watch the queue state using a
> separate mechanism when traffic trapping is engaged? This certainly
Well, this certainly won't work, as the bit should be tied to struct
net_device. The first idea was more sound: just set/reset __LINK_STATE_XOFF
flag, not calling __netif_schedule(), i.e. remove #ifdef from
netif_stop_queue() and replace return stmt in netif_wake_queue() by
clear_bit(__LINK_STATE_XOFF, &dev->state).
> would avoid TX queue overflows in drivers while also avoiding any
> dev->state changes and even worse evil __netif_schedule() call, i.e.
> things that CONFIG_NETPOLL_TRAP is currectly trying to avoid, AFAIU...
I think I'll submit a patch -- netpoll traffic trapping is pretty broken
as it is now.
>> Thanks a lot.
>> -Amit
WBR, Sergei
next prev parent reply other threads:[~2007-03-14 14:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200701312144.56497.sshtylyov@ru.mvista.com>
[not found] ` <45DDBD96.10000@ru.mvista.com>
[not found] ` <45DDC7C0.8050100@ru.mvista.com>
2007-02-23 7:08 ` [Kgdb-bugreport] [PATCH 2.6.20-rc7] 8139too KGDBoE fix Amit S. Kale
2007-02-23 18:10 ` Mark Huth
2007-02-23 19:04 ` Stephen Hemminger
2007-02-23 19:09 ` Sergei Shtylyov
2007-02-23 19:13 ` Stephen Hemminger
2007-02-23 19:16 ` Sergei Shtylyov
2007-02-23 19:22 ` Stephen Hemminger
2007-02-23 19:27 ` Sergei Shtylyov
2007-02-23 20:34 ` Mark Huth
2007-03-14 13:42 ` Sergei Shtylyov
2007-03-14 14:04 ` Sergei Shtylyov [this message]
2007-03-14 21:40 ` Sergei Shtylyov
[not found] <1172746367.2515.31.camel@xenon>
2007-03-01 16:22 ` Sergei Shtylyov
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=45F800F8.5020903@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=amitkale@linsyssoft.com \
--cc=mhuth@mvista.com \
--cc=mithlesh@linsyssoft.com \
--cc=netdev@vger.kernel.org \
--cc=vwool@ru.mvista.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;
as well as URLs for NNTP newsgroup(s).