From: Peter Wu <lekensteyn@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org,
Realtek linux nic maintainers <nic_swsd@realtek.com>
Subject: Re: r8169: is the work queue is initialized at wrong place?
Date: Sun, 21 Jul 2013 01:22:29 +0200 [thread overview]
Message-ID: <1603372.dtUZthYKQE@al> (raw)
In-Reply-To: <20130718215343.GA25075@electric-eye.fr.zoreil.com>
On Thursday 18 July 2013 23:53:43 Francois Romieu wrote:
> Peter Wu <lekensteyn@gmail.com> :
> [...]
>
> > However, this queue is only initialized in rtl_open:
> >
> > 6673 INIT_WORK(&tp->wk.work, rtl_task);
> > 6674
> > 6675 smp_mb();
> >
> > Shouldn't this INIT_WORK be done in rtl_init_one ?
>
> (or cancel_work_sync in rtl8169_close to reduce the scope)
>
> I do not see how the current code could hurt but it's really ugly.
>
> > I do not know what this smp_mb is used for in this context, so I leave
> > an appropriate patch up to you.
>
> It does not cost much and it enforces an initialized state. IRQ - real
> or shared ones - and napi poll could happen really soon after this point.
> There is probably some implicit memory barrier the driver could rely on.
> It would be a bit hackish though.
>
> I'll check the history and cook a patch.
Just to let you know, I am working on a patch since I encountered a
different(related?) issue that spams the syslog.The patch and partial analysis
is ready but untested.
Regards,
Peter
prev parent reply other threads:[~2013-07-20 23:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 9:17 r8169: is the work queue is initialized at wrong place? Peter Wu
2013-07-18 21:53 ` Francois Romieu
2013-07-18 22:41 ` Peter Wu
2013-07-19 3:16 ` David Miller
2013-07-19 6:10 ` Francois Romieu
2013-07-19 9:23 ` Peter Wu
2013-07-20 23:22 ` Peter Wu [this message]
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=1603372.dtUZthYKQE@al \
--to=lekensteyn@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=romieu@fr.zoreil.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).