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>] [day] [month] [year] [list]
Date:	Sun, 25 Jan 2009 15:52:51 +0000
From:	Richard Kennedy <richard@....demon.co.uk>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Kyle McMartin <kyle@...radead.org>, Takashi Iwai <tiwai@...e.de>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] module: kzalloc mod->ref

On Thu, 2009-01-15 at 13:03 +1030, Rusty Russell wrote:
>  
> 
> On Thursday 15 January 2009 04:47:48 Kyle McMartin wrote:
> 
> > On Wed, Jan 14, 2009 at 05:51:27PM +0000, richard kennedy wrote:
> 
> > > Aside from the code in socket does this reference count really get
> used
> 
> > > that often? Atomic_t gets used for ref counts is lots of other
> places in
> 
> > > the kernel, so why not turn module_ref into an atomic counter &
> drop the
> 
> > > array entirely saving all of the memory & disk space?
> 
> The code was originally written with the intent that networking would
> inc and dec a module count on every *packet*. It doesn't, however
> (though it would be interesting to instrument who does manip it, and
> how often).
> 
> I suspect that we could get away with an atomic_t and noone would
> notice, but I'd like to see evidence one way or the other.
> 
> Cheers,
> 
> Rusty.
Hi Rusty,
I've been running module reference counts as atomic_t on my desktop
(x86_64 AMD X2) all week and haven't been able to measure any
significant performance differences. I guess more cpus & server
workloads could show up something, but I don't have access to that sort
of hardware.

The one issue I am seeing is with my simple test harness, which is just
a very basic socket client/server. With the existing ref counting code,
when running several copies of the client I sometimes get EADDRNOTAVAIL
(-99) errors on socket connect(). But I don't see any errors with the
atomic_t ref counting. 
I'm still trying to debug this, but I haven't yet found where in the
network stack these errors are coming from. 

regards
Richard




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ