[lkml]   [2003]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RFC] 1/2 central workspace for zlib
> The following creates a central workspace per cpu for the zlib.  The
> original idea was to save memory for embedded, but this should also
> improve performance for smp.


Thank you for the patch.
It definitely reduces resources and improve multiple CPU scalability.

But I still would like to stick to performance.
(Though I haven't evaluated the performance yet...)
So far I think MTD is used mostly on Embedded device,
in which single CPU which is not so powerful is used.

How is the following code (it is ugly though)?

static void default_workspace[WSIZE];


size = MAX(sizeof(struct inflate_workspace),
sizeof(struct deflate_workspace));

if(WSIZE < size)

zlib_workspace[0] = default_workspace;

for (i=1; i<smp_num_cpus; i++) {
zlib_workspace[i] = vmalloc(size);
if (!zlib_workspace[i]) {
return -ENOMEM;

There is another vmalloc in mtdblock_open()...;-)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:2.473 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site