summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ide: remove ->end_request methodBartlomiej Zolnierkiewicz2009-03-277-54/+7
| | | | | | | | | | | | * Handle completion of private driver requests explicitly for ide_floppy and ide_tape media in ide_kill_rq(). * Remove no longer needed ->end_request method. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{floppy,tape}: cleanup ide*_end_request()Bartlomiej Zolnierkiewicz2009-03-272-53/+53
| | | | | | | | | | | | | | | | * ide*_end_request() is only called with uptodate == 0 or uptodate == 1 so cleanup it accordingly. * Inline ide*_end_request() content at call sites so the only user left is ->end_request method. * ->end_request is now used only for private driver requests so remove handling of other requests from ide*_end_request(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ->end_request only for private device driver requestsBartlomiej Zolnierkiewicz2009-03-275-31/+25
| | | | | | | | | | | | | | * Move IDE{FLOPPY,TAPE}_ERROR_* defines to <linux/ide.h> and rename them to IDE_DRV_ERROR_*. * Handle ->end_request special cases for floppy/tape media in ide_kill_rq(). * Call ->end_request only for private device driver requests. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ->failed_pc to ide_drive_tBartlomiej Zolnierkiewicz2009-03-274-32/+23
| | | | | | | | | Move ->failed_pc from struct ide_{disk,tape}_obj to ide_drive_t. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove superfluous tape->lockBartlomiej Zolnierkiewicz2009-03-271-9/+0
| | | | | | | tape->lock is not needed (->queue_lock protects queue). Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove superfluous check from ide_floppy_end_request()Bartlomiej Zolnierkiewicz2009-03-271-3/+1
| | | | | | | There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove no longer needed PC_FLAG_TIMEDOUT packet command flagBartlomiej Zolnierkiewicz2009-03-272-7/+0
| | | | | | | There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* au1xxx-ide: auide_dma_end() cleanupBartlomiej Zolnierkiewicz2009-03-271-6/+1
| | | | | | | | No need to check / clear hwif->sg_nents. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* trm290: trm290_dma_setup() fixBartlomiej Zolnierkiewicz2009-03-271-0/+1
| | | | | | | Re-map sg table if necessary (not that it really matters since DMA support is disabled currently). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* icside: icside_dma_setup() fixesBartlomiej Zolnierkiewicz2009-03-271-0/+4
| | | | | | Check for ide_build_sglist() return value and re-map sg table if necessary. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move smart_enable() call out from get_smart_data()Bartlomiej Zolnierkiewicz2009-03-271-1/+3
| | | | | | | | | Move smart_enable() call out from get_smart_data() to proc_idedisk_read_smart(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->data_phase field from ide_hwif_tBartlomiej Zolnierkiewicz2009-03-275-21/+10
| | | | | | | | | | | | * Always use hwif->task->data_phase and remove ->data_phase field from ide_hwif_t. * Remove superfluous REQ_TYPE_ATA_TASKFILE check from ide_pio_datablock() while at it. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: no need to read Status and Error registers for "empty" taskfile requestsBartlomiej Zolnierkiewicz2009-03-271-3/+1
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move request type specific code from ide_end_drive_cmd() to callers (v3)Bartlomiej Zolnierkiewicz2009-03-276-41/+43
| | | | | | | | | | | | | | | | | | | * Move request type specific code from ide_end_drive_cmd() to callers. * Remove stale ide_end_drive_cmd() documentation and drop no longer used 'stat' argument. Then rename the function to ide_complete_rq(). v2: * Fix handling of blk_pm_request() requests in task_no_data_intr(). v3: * Some ide_no_data_taskfile() users (HPA code and HDIO_DRIVE_* ioctls handlers) access original command later so we need to update it in ide_complete_task(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: factor out completion of taskfile from ide_end_drive_cmd()Bartlomiej Zolnierkiewicz2009-03-271-11/+16
| | | | | | | | | Factor out completion of taskfile from ide_end_drive_cmd() to ide_complete_task(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: complete power step in ide_complete_pm_request()Bartlomiej Zolnierkiewicz2009-03-273-9/+10
| | | | | | | | | | * Complete power step in ide_complete_pm_request(). * Rename ide_complete_pm_request() to ide_complete_pm_rq(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "flagged" taskfile flags to struct ide_taskfile (v2)Bartlomiej Zolnierkiewicz2009-03-279-56/+60
| | | | | | | | | | | | | | | | | | | | * Add ->ftf_flags field to struct ide_taskfile and convert flags for TASKFILE ioctl to use it. * Rename "flagged" taskfile flags: - IDE_TFLAG_FLAGGED -> IDE_FTFLAG_FLAGGED - IDE_TFLAG_FLAGGED_SET_IN_FLAGS -> IDE_FTFLAG_SET_IN_FLAGS - IDE_TFLAG_{OUT,IN}_DATA -> IDE_FTFLAG_{OUT,IN}_DATA v2: * Remember to fully update ide-h8300.c, scc_pata.c and tx493{8,9}ide.c (thanks to Stephen Rothwell for noticing). There should be no functional changes caused by this patch. Cc: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add IDE_HFLAG_4DRIVES host flagBartlomiej Zolnierkiewicz2009-03-273-3/+6
| | | | | | | | | Add IDE_HFLAG_4DRIVES host flag and use it instead of ide_4drives chipset type in ide_init_port(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add IDE_HFLAG_DTC2278 host flagBartlomiej Zolnierkiewicz2009-03-273-2/+5
| | | | | | | | | Add IDE_HFLAG_DTC2278 host flag and use it instead of ide_dtc2278 chipset type in ide_init_port(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove now superfluous check from ide_host_register()Bartlomiej Zolnierkiewicz2009-03-271-12/+7
| | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allow host drivers to specify IRQ flagsBartlomiej Zolnierkiewicz2009-03-2713-21/+26
| | | | | | | | | | | | | * Add ->irq_flags field to struct ide_port_info and struct ide_host. * Update host drivers and IDE PCI code to use ->irq_flags field. * Convert init_irq() and ide_intr() to use host->irq_flags. This fixes handling of shared IRQs for non-PCI hosts and removes ugly ifdeffery from core IDE code. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix error message in pre_task_out_intr()Bartlomiej Zolnierkiewicz2009-03-271-1/+3
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix memleak on failure in probe_for_drive()Bartlomiej Zolnierkiewicz2009-03-272-15/+9
| | | | | | | | | | Always free drive->id in probe_for_drive() if device is not present. While at it: - remove dead IDE_DFLAG_DEAD flag - remove superfluous IDE_DFLAG_PRESENT check Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* scc_pata: remove DECLARE_SCC_DEV() macro (v2)Bartlomiej Zolnierkiewicz2009-03-271-16/+11
| | | | | | | | v2: scc_chipsets[] -> scc_chipset fix (spotted by Daniel K.). Cc: "Daniel K." <daniel@cluded.net> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: include <asm/ide.h> only when neededBartlomiej Zolnierkiewicz2009-03-274-7/+11
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* at91_ide: use readsw()/writesw() directlyBartlomiej Zolnierkiewicz2009-03-271-2/+2
| | | | | | | | Use readsw()/writesw() directly intead of __ide_mm_{in,out}sw() macros. Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: use ide_drive_t's rq in cdrom_queue_request_senseBorislav Petkov2009-03-272-3/+1
| | | | | | | | There should be no functionality change resulting from this patch. Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()Kevin Hilman2009-03-271-4/+9
| | | | | | | Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> [bart: minor CodingStyle fixup per Sergei's suggestion] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: cleanup <asm-m68k/ide.h>Bartlomiej Zolnierkiewicz2009-03-273-38/+4
| | | | | | | | | | | | | | | | * Remove superfluous <asm/macints.h> include. * No need to re-define in/out*() macros as they are no longer used by m68k host drivers. * readl() and writel() are not used by core IDE code. * Use raw_*_swapw() directly in {falcon,q40}ide.c and remove {in,out}sw_swapw() macros. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: make m68k host drivers use IDE_HFLAG_MMIOBartlomiej Zolnierkiewicz2009-03-275-12/+7
| | | | | | Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove IDE_ARCH_LOCK (v2)Bartlomiej Zolnierkiewicz2009-03-275-50/+42
| | | | | | | | | | | | | | | | | | * Add ->{get,release}_lock methods to struct ide_port_info and struct ide_host. * Convert core IDE code, m68k IDE code and falconide support to use ->{get,release}_lock methods instead of ide_{get,release}_lock(). * Remove IDE_ARCH_LOCK. v2: * Build fix from Geert updating ide_{get,release}_lock() callers in falconide.c. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove IDE_ARCH_INTR (v2)Bartlomiej Zolnierkiewicz2009-03-273-10/+3
| | | | | | | | | | | | | This micro-optimization is not worth it. Just always check for existence of ->ack_intr method in ide_intr() and ide_timer_expiry(). v2: Fix brown-paper-bag bug spotted by David D. Kilzer. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Cc: "David D. Kilzer" <ddkilzer@kilzer.net> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: improve debugging schemeBorislav Petkov2009-03-276-93/+83
| | | | | | | and more specifically, push __func__ into debug macro thus making ide_debug_log() calls shorter and more readable. Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
* ide: move ->rqsize init from init_irq() to ide_init_port()Bartlomiej Zolnierkiewicz2009-03-271-8/+7
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* macide: use struct ide_port_infoBartlomiej Zolnierkiewicz2009-03-271-1/+5
| | | | | | | This fixes hwif->channel and drive->dn assignments. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* buddha: use struct ide_port_infoBartlomiej Zolnierkiewicz2009-03-271-1/+5
| | | | | | | This fixes hwif->channel and drive->dn assignments. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-pnp: use struct ide_port_infoBartlomiej Zolnierkiewicz2009-03-271-1/+5
| | | | | | This fixes hwif->channel and drive->dn assignments. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-generic: use struct ide_port_infoBartlomiej Zolnierkiewicz2009-03-271-2/+6
| | | | | | This fixes hwif->channel and drive->dn assignments. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide_arm: use struct ide_port_infoBartlomiej Zolnierkiewicz2009-03-271-1/+5
| | | | | | | This fixes hwif->channel and drive->dn assignments. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* icside: use struct ide_port_info also for PCB version 5 (v2)Bartlomiej Zolnierkiewicz2009-03-271-2/+6
| | | | | | | | | | This fixes hwif->channel and drive->dn assignments. v2: Fix v5/v6 mismatch noticed by Russell. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-03-263-50/+96
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slob: fix lockup in slob_free() slub: use get_track() slub: rename calculate_min_partial() to set_min_partial() slub: add min_partial sysfs tunable slub: move min_partial to struct kmem_cache SLUB: Fix default slab order for big object sizes SLUB: Do not pass 8k objects through to the page allocator SLUB: Introduce and use SLUB_MAX_SIZE and SLUB_PAGE_SHIFT constants slob: clean up the code SLUB: Use ->objsize from struct kmem_cache_cpu in slab_free()
| *-------. Merge branches 'topic/slob/cleanups', 'topic/slob/fixes', 'topic/slub/core', ↵Pekka Enberg2009-03-243-50/+96
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'topic/slub/cleanups' and 'topic/slub/perf' into for-linus
| | | | | | * SLUB: Fix default slab order for big object sizesZhang Yanmin2009-02-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default order of kmalloc-8192 on 2*4 stoakley is an issue of calculate_order. slab_size order name ------------------------------------------------- 4096 3 sgpool-128 8192 2 kmalloc-8192 16384 3 kmalloc-16384 kmalloc-8192's default order is smaller than sgpool-128's. On 4*4 tigerton machine, a similiar issue appears on another kmem_cache. Function calculate_order uses 'min_objects /= 2;' to shrink. Plus size calculation/checking in slab_order, sometimes above issue appear. Below patch against 2.6.29-rc2 fixes it. I checked the default orders of all kmem_cache and they don't become smaller than before. So the patch wouldn't hurt performance. Signed-off-by Zhang Yanmin <yanmin.zhang@linux.intel.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | | | * SLUB: Do not pass 8k objects through to the page allocatorPekka Enberg2009-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase the maximum object size in SLUB so that 8k objects are not passed through to the page allocator anymore. The network stack uses 8k objects for performance critical operations. The patch is motivated by a SLAB vs. SLUB regression in the netperf benchmark. The problem is that the kfree(skb->head) call in skb_release_data() that is subject to page allocator pass-through as the size passed to __alloc_skb() is larger than 4 KB in this test. As explained by Yanmin Zhang: I use 2.6.29-rc2 kernel to run netperf UDP-U-4k CPU_NUM client/server pair loopback testing on x86-64 machines. Comparing with SLUB, SLAB's result is about 2.3 times of SLUB's. After applying the reverting patch, the result difference between SLUB and SLAB becomes 1% which we might consider as fluctuation. [ penberg@cs.helsinki.fi: fix oops in kmalloc() ] Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> Tested-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | | | * SLUB: Introduce and use SLUB_MAX_SIZE and SLUB_PAGE_SHIFT constantsChristoph Lameter2009-02-202-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a preparational patch to bump up page allocator pass-through threshold, introduce two new constants SLUB_MAX_SIZE and SLUB_PAGE_SHIFT and convert mm/slub.c to use them. Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> Tested-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | | * | slub: use get_track()Akinobu Mita2009-03-231-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use get_track() in set_track() Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | | * | SLUB: Use ->objsize from struct kmem_cache_cpu in slab_free()Pekka Enberg2009-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to use ->objsize from struct kmem_cache in slab_free() for the SLAB_DEBUG_OBJECTS case. All it does is generate extra cache pressure as we try very hard not to touch struct kmem_cache in the fast-path. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | * | | slub: rename calculate_min_partial() to set_min_partial()David Rientjes2009-02-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Christoph Lameter, rename calculate_min_partial() to set_min_partial() as the function doesn't really do any calculations. Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | * | | slub: add min_partial sysfs tunableDavid Rientjes2009-02-231-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that a cache's min_partial has been moved to struct kmem_cache, it's possible to easily tune it from userspace by adding a sysfs attribute. It may not be desirable to keep a large number of partial slabs around if a cache is used infrequently and memory, especially when constrained by a cgroup, is scarce. It's better to allow userspace to set the minimum policy per cache instead of relying explicitly on kmem_cache_shrink(). The memory savings from simply moving min_partial from struct kmem_cache_node to struct kmem_cache is obviously not significant (unless maybe you're from SGI or something), at the largest it's # allocated caches * (MAX_NUMNODES - 1) * sizeof(unsigned long) The true savings occurs when userspace reduces the number of partial slabs that would otherwise be wasted, especially on machines with a large number of nodes (ia64 with CONFIG_NODES_SHIFT at 10 for default?). As well as the kernel estimates ideal values for n->min_partial and ensures it's within a sane range, userspace has no other input other than writing to /sys/kernel/slab/cache/shrink. There simply isn't any better heuristic to add when calculating the partial values for a better estimate that works for all possible caches. And since it's currently a static value, the user really has no way of reclaiming that wasted space, which can be significant when constrained by a cgroup (either cpusets or, later, memory controller slab limits) without shrinking it entirely. This also allows the user to specify that increased fragmentation and more partial slabs are actually desired to avoid the cost of allocating new slabs at runtime for specific caches. There's also no reason why this should be a per-struct kmem_cache_node value in the first place. You could argue that a machine would have such node size asymmetries that it should be specified on a per-node basis, but we know nobody is doing that right now since it's a purely static value at the moment and there's no convenient way to tune that via slub's sysfs interface. Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
| | | | * | | slub: move min_partial to struct kmem_cacheDavid Rientjes2009-02-232-14/+17
| | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it allows for better cacheline use, it is unnecessary to save a copy of the cache's min_partial value in each kmem_cache_node. Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
OpenPOWER on IntegriCloud