Re: kmalloc max allocation size, netlink max buffer zise

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vinay Kalkoti wrote:

On 6/22/05, MHD.Tayseer <gilmour@xxxxxxxxxxx> wrote:
Hi everyone:
in the 2.6 kernel:
1- what is the maximum size i can kmalloc it in kernel ?
           I had read in a document that said, if u use GFP_KERNEL u
can use 128kb.  if u  use GFP_DMA, then  the  maxm size can be of the
page size.
if you wanna know why should i need large kmalloc and large netlink msg
size cause I'm implementing the vfs call :
ssize_t my_fs_write(int gfd, const char __user * data, size_t count,
loff_t * offset)
and the actual file system implementation is in user level (user-level
file server)
so i have to copy the data from user to kernel and then send it via
netlink socket to the userlevel file system server
Thanks
if you do `ltrace -S cp file1 file2` you'll see that all the read and write syscalls are of units of 4K .. can i take this assumption and expect a maximum length for read and write of 4K (thus it's safe to kmalloc the all requested size without partitioning the request into smaller pieces cause of the assumption taken above or it's only true for calles through c library ?


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux