[linux-cifs-client] Maximum kmem_cache_create size

Steve French smfrench at gmail.com
Tue May 22 21:54:12 GMT 2007


When using mm/slab.c the maximum size of kmem_cache_created objects
seems to be simply KMALLOC_MAX_SIZE.  Is it the same thing when using
the version of kmem_cache_create in mm/slub.c?

What are common values of this for different architectures?  On this
Intel (Core 2 T7600) system it shows up as 0x800000 which is larger
than I thought it used to be.

Now that Samba 3.0.26pre server supports larger than 128K read
operations, I wanted to be able to allow users to configure (at insmod
time for cifs.ko) the maximum read buffer size supported.  I wanted to
be able to set it to a smaller value during cifs_init_request_bufs if
they tried to set it explicitly to something over KMALLOC_MAX_SIZE but
want to make sure that this value applies no matter which version of
kmem_cache_create (slub vs. slab) that they use.

I realize that allocating larger objects could make read performance
worse (fortunately for most cases cifs write does not need to use
large buffers since it can send a page list)  so I am leaving the
default request buffer size the same (most servers prefer roughly
16K+sizeof header) - and in any case the RFC1001/1002 length field
only has room for 3 bytes (so 0x800000 is close to the maximum the
protocol would support anyway).

-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list