From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] pkt_sched: fq: do not hold qdisc lock while allocating memory
Date: Sat, 08 Mar 2014 19:10:32 -0500 (EST) [thread overview]
Message-ID: <20140308.191032.101129109368547659.davem@davemloft.net> (raw)
In-Reply-To: <1394233362.20149.47.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 07 Mar 2014 15:02:42 -0800
> On Fri, 2014-03-07 at 17:04 -0500, David Miller wrote:
>
>> Eric I think you can simplify things a little further, and in fact I
>> think it makes these functions easier to understand.
>>
>> The fq_resize() part should just grab the lock around the rehash and
>> the update of q->fq_root and q->fq_trees_log.
>>
>> fq_change() should only grab the lock around the fq_dequeue() loop
>> and the call to qdisc_tree_descrease_qlen(). The rest of this
>> function is just validating netlink attributes and looking at state
>> that cannot change while we hold RTNL.
>
> Hmm, but all these parameters we change in fq_change() are read by other
> cpus doing enqueue()/dequeue().
>
> They are integers, so a race would be not a big deal I guess, but better
> add a fat comment then ;)
Good point, this patch as-is is fine, so applied.
next prev parent reply other threads:[~2014-03-09 0:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 6:57 [PATCH] pkt_sched: fq: do not hold qdisc lock while allocating memory Eric Dumazet
2014-03-07 22:04 ` David Miller
2014-03-07 23:02 ` Eric Dumazet
2014-03-09 0:10 ` David Miller [this message]
2014-03-09 14:18 ` Eric Dumazet
2014-03-10 20:18 ` David Miller
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=20140308.191032.101129109368547659.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/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).