lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 14 Jan 2008 09:19:00 -0800
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	Andi Kleen <ak@...e.de>
Cc:	netdev@...r.kernel.org, linux-kerne@...r.kernel.org
Subject: Re: [PATCH/RFC] synchronize_rcu(): high latency on idle system

On Sun, 13 Jan 2008 16:34:17 +0100
Andi Kleen <ak@...e.de> wrote:

> 
> > I think it should be in netdev_unregister_kobject().  But that would
> > only get rid of one of the two calls to synchronize_rcu() in the unregister_netdev.
> 
> Would be already an improvement.
> 
> > The other synchronize_rcu() is for qdisc's and not sure if that one can
> > be removed?
> 
> The standard way to remove such calls is to set a "deleted" flag in the object,
> then check and ignore such objects in the reader and finally remove the object with
> call_rcu
> 
> I have not checked if that is really feasible for qdiscs.
> 
> -Andi

Actually, the synchronize_rcu() is now acting a barrier between two sections
in the current unregister process. It can't be removed.

But, an alternative unregister_and_free_netdev() could be created that uses
call_rcu.  Basically:

void unregistr_and_free_netdev() {
    do stuff before barrier...
    setup rcu callback
    call_rcu();
}

static void netdev_after_rcu() {
    rtnl_lock();
    do stuff after barier
    rtnl_unlock();
    free_netdev
}

-- 
Stephen Hemminger <stephen.hemminger@...tta.com>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ