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]
Date:	Sat, 22 Aug 2009 14:28:45 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Dave Hansen <dave@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org,
	Randy Dunlap <randy.dunlap@...cle.com>
Subject: Re: [patch 4/4 -mm] flex_array: add flex_array_shrink function

On Fri, 21 Aug 2009, Andrew Morton wrote:

> > +/**
> > + * flex_array_shrink - free unused second-level pages
> > + *
> > + * Frees all second-level pages that consist solely of unused
> > + * elements.  Returns the number of pages freed.
> > + *
> > + * Locking must be provided by the caller.
> > + */
> > +int flex_array_shrink(struct flex_array *fa)
> 
> It's logical but afaik unconventional that none of the flex_array
> kerneldoc actually documents the `struct flex_array *fa' argument.
> 

In the interest of completeness (vs. more doc clutter), we'd need to add 
seven or eight instances of "@fa: the flex array to manipulate," although 
that should be fairly obvious.

More of a priority might be to document flex_array_free() which lacks any 
commentary or add kerneldoc lines for the gfp_t formal of the three 
functions that use them.

> We're all waiting with bated breath to see who will be the first to use
> flex_array in live code.
> 

Now that flex_array_shrink() is in -mm, the cgroup code to manipulate 
arrays of pids could probably now use them without losing any 
functionality.

Beyond that, I don't know of any other users with enough incentive to 
immediately convert.  Its scope is unfortunately limited because it's an 
array and not a list, the latter of which you can efficiently iterate, 
sort, eliminate upper bounds, etc.

An alternative implementation, like a flex list, would probably find more 
users and could also be used by the cgroup code to manage pids.  Flex 
lists would be unbounded and can dynamically expand with linkage through 
page->lru when additional elements are pushed.
--
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