Update linux-kernel-mem

Additional minor memory related tweak to move certain large allocations
to virtual memory and in one case to simply suppress the warning message
since it is not that far over the warning limit.
This commit is contained in:
Brian Behlendorf 2010-06-14 16:08:15 -07:00
parent edb4ee024f
commit e7e0311ce4
2 changed files with 5 additions and 6 deletions

View File

@ -499,6 +499,7 @@ ddt_get_dedup_stats(spa_t *spa, ddt_stat_t *dds_total)
{
ddt_histogram_t *ddh_total;
/* XXX: Move to a slab */
ddh_total = kmem_zalloc(sizeof (ddt_histogram_t), KM_SLEEP);
ddt_get_dedup_histogram(spa, ddh_total);
ddt_histogram_stat(dds_total, ddh_total);
@ -647,6 +648,7 @@ ddt_alloc(const ddt_key_t *ddk)
{
ddt_entry_t *dde;
/* XXX: Move to a slab */
dde = kmem_zalloc(sizeof (ddt_entry_t), KM_SLEEP);
cv_init(&dde->dde_cv, NULL, CV_DEFAULT, NULL);
@ -795,7 +797,8 @@ ddt_table_alloc(spa_t *spa, enum zio_checksum c)
{
ddt_t *ddt;
ddt = kmem_zalloc(sizeof (*ddt), KM_SLEEP);
/* XXX: Move to a slab */
ddt = kmem_zalloc(sizeof (*ddt), KM_SLEEP | KM_NODEBUG);
mutex_init(&ddt->ddt_lock, NULL, MUTEX_DEFAULT, NULL);
avl_create(&ddt->ddt_tree, ddt_entry_compare,

View File

@ -437,11 +437,7 @@ log_internal(history_internal_events_t event, spa_t *spa,
return;
ha = kmem_alloc(sizeof (history_arg_t), KM_SLEEP);
ha->ha_history_str = kmem_alloc(vsnprintf(NULL, 0, fmt, adx) + 1,
KM_SLEEP);
(void) vsprintf(ha->ha_history_str, fmt, adx);
ha->ha_history_str = kmem_asprintf(fmt, adx);
ha->ha_log_type = LOG_INTERNAL;
ha->ha_event = event;
ha->ha_zone = NULL;