Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi, I want to test slab and slub for better performances. Could someone tell me where to switch between the slub or slab allocators ? I want to test the first one and then test the other later. I googled and I have found slub_config paramaters but don't know where to find it. For operating system I use Ubuntu 11.04 right now but I think the process is similar for many linux distrib I guess.
ciao
The base configuration I know for support for both of those (SLUB & SLAB), is in the kernel configuration. From my current config:
Code:
...<snip>...
CONFIG_PCI_QUIRKS=y
CONFIG_SLUB_DEBUG=y
CONFIG_COMPAT_BRK=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_PROFILING is not set
CONFIG_HAVE_OPROFILE=y
...
Now, to test and switch between them would normally require figuring out which you are currently set for, doing your benchmark tests in the kernel you have now, then create a new kernel config for the other and compile the new kernel, then boot into the new kernel and run your benchmarks again.
HTH. Let us know.
Last edited by ShadowCat8; 01-30-2012 at 05:51 PM.
Hmmm.
And just how do you propose to test this ?. Better define what you might perceive as "better performance" in this instance.
You are aware that this is not a userland allocator/garbage collector ?.
A lot of effort has gone into slub over time - can be (very) dependent on kernel level in some workloads. Less so these days as things have settled down somewhat.
I might also suggest that Ubuntu isn't the best distro for kernel hacking - way too much "fluff" to get in the way of (re-)compiles. I tried it once - only once.
I am trying to avoid a known kernel bug for long time in both 32 & 64bit plateforms, someone has approximately the seem issue and he got it solved after passing from SLAB to SLUB, according to this topic here.
For me, my syslog got the following :
Code:
Jan 31 09:17:13 bt kernel: [ 57.423928] rtusb init rt2870 --->
Jan 31 09:17:13 bt kernel: [ 57.424113] usbcore: registered new interface driver rt2870
...
I will see what is the effect of changing allocators and respond later.
Regards
In future, describe the (real, underlying) problem, rather than (incorrectly) guessing based on symptoms. The more info in the initial post, the better the likely answers.
That link is referring to real-time kernel running on ARM hardware - very much not mainstream Ubuntu territory. And they were referencing the *SLOB* allocator - which is for embedded systems; definitely not modern x86.
That rt2870 driver is more likely your problem - I just dredged up a Oneric system, and it looks to have the (preferred) rt2800usb driver available, but you'll probably need to load it and maybe blacklist your current driver. Run the following (use cut-and-paste) from a terminal and post the outputs for us
Code:
uname -a
lsb_release -a
grep -iE sl[aou]b /boot/config-$(uname -r)
lsmod | grep rt[0-9]
Thank you very mush for your kind help. I got it solved now after blacklisting the rt2800usb driver. I will be back if who know the problem persists again.
Please help, the problem above isn't solved yet. The problem percists with both drivers!! I didn't made any changes to the system so couldn't understand what is going on exactely or what is the source of error.
uname -a
Code:
Linux me 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
Code:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
Code:
grep -iE sl[aou]b /boot/config-$(uname -r)
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_SLABINFO=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
lsmod | grep rt[0-9]
Code:
[ 52.266768] phy0 -> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0580 with error -19.
[ 52.266923] phy0 -> rt2800_init_eeprom: Error - Invalid RT chipset detected.
[ 52.266969] phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
[ 52.267046] usbcore: registered new interface driver rt2800usb
[ 247.255280] usbcore: deregistering interface driver rt2800usb
[ 253.965569] usbcore: registered new interface driver rt2800usb
[ 298.677592] usbcore: deregistering interface driver rt2800usb
[ 308.174506] Registered led device: rt2800usb-phy0::radio
[ 308.174566] Registered led device: rt2800usb-phy0::assoc
[ 308.174588] Registered led device: rt2800usb-phy0::quality
[ 308.174605] usbcore: registered new interface driver rt2800usb
[ 325.285152] phy0 -> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x101c with error -71.
[ 333.179554] phy0 -> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -19.
[ 351.350173] Registered led device: rt2800usb-phy1::radio
[ 351.350222] Registered led device: rt2800usb-phy1::assoc
[ 351.350262] Registered led device: rt2800usb-phy1::quality
[ 353.394658] phy1 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x3000 with error -71.
[ 356.169520] phy1 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x7014 with error -71.
[ 359.268803] phy1 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x701c with error -71.
[ 361.328062] phy1 -> rt2x00usb_vendor_request: Error - Vendor Request 0x01 failed for offset 0x0000 with error -19.
[ 361.328071] phy1 -> rt2800usb_write_firmware: Error - Failed to write Firmware to device.
[ 361.368979] phy1 -> rt2800_wait_bbp_ready: Error - BBP register access failed, aborting.
[ 361.368983] phy1 -> rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5).
[ 401.236810] Registered led device: rt2800usb-phy2::radio
[ 401.236851] Registered led device: rt2800usb-phy2::assoc
[ 401.236892] Registered led device: rt2800usb-phy2::quality
[ 403.560363] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x3800 with error -71.
[ 405.921485] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x7014 with error -71.
[ 408.097823] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x701c with error -71.
[ 411.162156] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x01 failed for offset 0x0000 with error -71.
[ 411.162165] phy2 -> rt2800usb_write_firmware: Error - Failed to write Firmware to device.
[ 414.572719] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0400 with error -71.
[ 418.339377] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0400 with error -71.
[ 418.903621] phy2 -> rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x7028 with error -19.
[ 418.936638] phy2 -> rt2800_wait_bbp_ready: Error - BBP register access failed, aborting.
[ 418.936647] phy2 -> rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5).
lsusb
Code:
Bus 002 Device 015: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1005
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Hope that helps.
[EDIT]
I did a browse to compat-wireles-dir/drivers/net/wireless/rt2x00/ and browsing for files rt2800usb.c and rt2x00usb.c where the error function rt2x00usb_vendor_request is located, it seem a sophesticated problem because this function is linked to so many others maybe a timmer issue or maybe something else. My problem is still not solved yet.
Last edited by patapout; 02-02-2012 at 06:06 PM.
Reason: Additional notes
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.