[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1394233362.20149.47.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Fri, 07 Mar 2014 15:02:42 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] pkt_sched: fq: do not hold qdisc lock while allocating
memory
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 ;)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists