Sponsored Content
Operating Systems Linux SuSE max number of slabs per kernel module (kernel 2.6.17, suse) Post 302160416 by Perderabo on Monday 21st of January 2008 08:29:37 PM
Old 01-21-2008
There is no arbitrary limit on the number of slabs that a kernel routine (whether or not it is a module) can use, but no computer has an infinite amount of memory either. Zones are different than slabs. Memory locations have an address and not all addresses are identical in nature. This stuff varies greatly depending on the cpu. As an example, on a typical Pentium, ZONE_DMA memory has an addresss below 16 MB and is usable for DMA transfers. There are only a very few zones. This stuff is documented in "Understanding the Linux Kernel", by Bovet and Cesati, ISBN 0-596-00565-2.
 

4 More Discussions You Might Find Interesting

1. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

2. IP Networking

kernel module

Hi All, I need to develop a kernel module which changes the IP address of a package according to its mac address. It would be a sort of L2 Nat. Somebody know if I can do this using netfilter?? Thanks. (2 Replies)
Discussion started by: lagigliaivan
2 Replies

3. Linux

kernel module parameters

Hi, if I install a module with specific parameter, will this parameters applied next time system boots? for exampe, I want to disable InterruptThrottleRate modprobe e1000e InterruptThrottleRate=0 Is this parameter apllied only for this run, or this module will always use this parameter when... (2 Replies)
Discussion started by: Shedon
2 Replies

4. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies
vm_map_pageable(9r)													       vm_map_pageable(9r)

NAME
vm_map_pageable - General: Sets pageability of the specified address range SYNOPSIS
kern_return_t vm_map_pageable( vm_map_t map, vm_offset_t start, vm_offset_t end, vm_prot_t access_type ); ARGUMENTS
Specifies the address map associated with an individual process. Specifies the starting address of an address range. Typically, this is the address of the user's buffer where the DMA operation occurs. Specifies the ending address of a consecutive range of addresses begin- ning with the start argument. Specifies the access mode to be set for memory specified by the start and end arguments. You can set this argument to VM_PROT_NONE or to the bitwise inclusive OR of the protection bits VM_PROT_READ and VM_PROT_WRITE. These bits are defined in the file <mach/vm_prot.h> and have the following meanings: Modifies the memory attributes so that the specified range of addresses is no longer locked. This should be done after the DMA operation has completed. Verifies that the specifed range of addresses is readable by the specified process. If so, the range of addresses is locked in memory to remain stable throughout the DMA operation. Verifies that the specifed range of addresses is writable by the specified process. If so, the range of addresses is locked in memory to remain stable throughout the DMA operation. Verifies that the specifed range of addresses is readable and writable by the specified process. If so, the range of addresses is locked in memory to remain stable throughout the DMA operation. DESCRIPTION
The vm_map_pageable routine ensures that the address range you specified in the start and end arguments is accessible. If the address range is accessible by the specified process, the memory associated with this address range will have its locked attributes modified as specified by the access_type argument. A kernel module can call this routine prior to performing a DMA operation to ensure that: The currently run- ning process has read or write access permission to the user's buffer The memory representing the user's buffer is locked so that it remains available throughout the DMA operation. NOTES
This routine may block in the kernel. Therefore, you should release all locks and lower the SPL before calling vm_map_pageable. When the routine returns, you should relock the data and check the data integrity. RETURN VALUES
Upon successful completion, the vm_map_pageable routine returns the value 0 (zero). Otherwise, it returns a nonzero value to indicate an error. EXAMPLE
The following code fragment shows how the vm_map_pageable routine ensures that the user's buffer is accessible to cause the corresponding memory to be locked: if (vm_map_pageable(current_task()->map, trunc_page(bp->b_un.b_addr), round_page(bp->b_un.b_addr + (int)bp->b_bcount), (bp->b_flags == B_READ ? VM_PROT_READ : VM_PROT_WRITE))) { /*************************************************** * Here you implement the code to perform the * * actual DMA operation. Upon conclusion of the * * DMA operation, add the following code to * * release the locked attribute. * ***************************************************/ if (vm_map_pageable(current_task()->map, trunc_page(bp->b_un.b_addr), round_page(bp->b_un.b_addr + (int)bp->b_bcount), VM_PROT_NONE)) { SEE ALSO
Routines: current_task(9r), round_page(9r), trunc_page(9r) vm_map_pageable(9r)
All times are GMT -4. The time now is 07:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy