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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa686aa40810280608q1c58e07cq7c5f2cc9feeb8ef6@mail.gmail.com>
Date:	Tue, 28 Oct 2008 07:08:06 -0600
From:	"Grant Likely" <grant.likely@...retlab.ca>
To:	"Paulius Zaleckas" <paulius.zaleckas@...tonika.lt>
Cc:	netdev@...r.kernel.org, linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-embedded@...r.kernel.org
Subject: Re: [PATCH] phylib: add mdio-gpio bus driver (v2)

On Tue, Oct 28, 2008 at 1:46 AM, Paulius Zaleckas
<paulius.zaleckas@...tonika.lt> wrote:
> Grant Likely wrote:
>> The IRQ array is fixed size.  You can add it to the mdio_gpio_info
>> structure and then just set the pointer here so that only one kzalloc
>> is needed.
>
> It can be put in mdio_gpio_info, but please note that mdio_gpio_info is
> allocated with kzalloc() and irq with kmalloc(), because there is no need
> to fill this array with zeros(see below).

Adding an additional 32 words to be zeroed in the mdio_gpio_info
kzalloc is considerably cheaper than doing an additional kmalloc.
Plus, once the array is zeroed it is then in the cache and so the
filling it with -1 also becomes cheaper.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
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