[CRIU] [PATCH 8/9] headers: Introduce hashing helpers

Cyrill Gorcunov gorcunov at openvz.org
Tue Apr 2 12:39:56 EDT 2013


On Tue, Apr 02, 2013 at 08:32:40PM +0400, Pavel Emelyanov wrote:
> On 04/01/2013 07:27 PM, Cyrill Gorcunov wrote:
> > 
> > They are taken from linux kernel and adopted for
> > our needs. While I'll need it for converter there
> > are a bunch of places in crtools which better to
> > switch to hashing instead of linear search.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  include/hash.h      |  75 ++++++++++++++++++++++++
> >  include/hashtable.h | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 237 insertions(+)
> >  create mode 100644 include/hash.h
> >  create mode 100644 include/hashtable.h
> 
> For now it's an overkill to use the-most-generic-hash-ever.
> Simple %-based hashing +hlists is more than enough.

Pavel, I use it alot in cpt2 so I moved this headers to
crtools because I wanna share the headers. This hashing
is generic, I don't need to write hashing by hand (only
once when it's declared). So if you don't wanna push it
into crtools headers, let me save them in cpt2 sources
then.


More information about the CRIU mailing list