Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Nov 2005 10:45:32 -0200
From:      =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= <jonny@jonny.eng.br>
To:        Peter Jeremy <PeterJeremy@optushome.com.au>
Cc:        kamal kc <kamal_ckk@yahoo.com>, freebsd <freebsd-hackers@freebsd.org>, Giorgos Keramidas <keramida@linux.gr>
Subject:   Re: allocating 14KB memory per packet compression/decompression	results in vm_fault
Message-ID:  <436B57EC.6090004@jonny.eng.br>
In-Reply-To: <20051104094904.GL39882@cirb503493.alcatel.com.au>
References:  <20051103145729.GA2088@flame.pc>	<20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> <20051104094904.GL39882@cirb503493.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Jeremy wrote:
>>what would be the best possible way to 
>>allocate/deallocate 14KB memory per packet without 
>>causing vm_faults ?? 
> 
> The most efficient way would be to statically allocate the dictionary
> and string tables.  The downside is that you then need to serialise
> the [de]compression.

I would suggest static allocation, also.  I agree that malloc should not 
misbehave, but static allocation will surely be faster.

And, if you have more than one CPU, you could allocate one static buffer per CPU 
to allow for parallelization.

If you don't have more than one CPU, I think serialization will do no big harm.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?436B57EC.6090004>