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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090114181748.GQ25103@bombadil.infradead.org>
Date:	Wed, 14 Jan 2009 13:17:48 -0500
From:	Kyle McMartin <kyle@...radead.org>
To:	richard kennedy <richard@....demon.co.uk>
Cc:	Kyle McMartin <kyle@...radead.org>, Takashi Iwai <tiwai@...e.de>,
	rusty@...tcorp.com.au, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] module: kzalloc mod->ref

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?
> 
> I do wonder if socket could manage its module lifetimes in some other
> way, then we really could just use an atomic module ref without too much
> impact. I didn't get very far in trying to work out what exactly was
> going on in socket.c but maybe it's worth another look.
> 

I suppose it depends on how much contention there will end up being on
the atomic_t, given that right now, the module_ref structure favours
writers (since readers need to loop.) 

I'd like to hear what rusty has to say, but I'm working on a patch
to do module_ref with RCU (and to allocate it in modpost with per_cpu
variables, but that needs more testing.) I'll check what kind of
difference those end up making.

> I don't have any network test harness so it's difficult to tell what
> impact any code change is going to have. Do you have any suggestions for
> a good test of this?
> 

No, but I imagine Rick Jones' netperf would show the effect, if any.

cheers, Kyle
--
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