mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Maximum kmem_cache_create size
@ 2007-05-22 21:54 Steve French
  0 siblings, 0 replies; only message in thread
From: Steve French @ 2007-05-22 21:54 UTC (permalink / raw)
  To: linux-kernel, jra, linux-cifs-client

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-22 21:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-22 21:54 Maximum kmem_cache_create size Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®