search for: kmem_cache

Displaying 20 results from an estimated 246 matches for "kmem_cache".

2013 Jan 16
6
[PATCH V2] mm/slab: add a leak decoder callback
...bject) +{ + struct extent_buffer *eb = object; + + printk(KERN_ERR "btrfs buffer leak start %llu len %lu " + "refs %d\n", (unsigned long long)eb->start, + eb->len, atomic_read(&eb->refs)); +} + int __init extent_io_init(void) { extent_state_cache = kmem_cache_create("btrfs_extent_state", @@ -115,9 +135,11 @@ void extent_io_exit(void) */ rcu_barrier(); if (extent_state_cache) - kmem_cache_destroy(extent_state_cache); + kmem_cache_destroy_decoder(extent_state_cache, + extent_state_leak_decoder); if (extent_buffer_cache) - kmem...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
Just use kmem_cache instead of rolling our own, limited implementation. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +-- drivers/gpu/drm/virtio/virtgpu_vq.c | 57 +++++++----------------------------- 2 files changed, 11 insertions(+), 50 deletions(-) diff...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
Just use kmem_cache instead of rolling our own, limited implementation. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +-- drivers/gpu/drm/virtio/virtgpu_vq.c | 57 +++++++----------------------------- 2 files changed, 11 insertions(+), 50 deletions(-) diff...
2019 May 16
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Sun, 12 May 2019, Halil Pasic wrote: > I've also got code that deals with AIRQ_IV_CACHELINE by turning the > kmem_cache into a dma_pool. > > Cornelia, Sebastian which approach do you prefer: > 1) get rid of cio_dma_pool and AIRQ_IV_CACHELINE, and waste a page per > vector, or > 2) go with the approach taken by the patch below? We only have a couple of users for airq_iv: virtio_ccw.c: 2K bits pci w...
2019 May 16
3
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Sun, 12 May 2019, Halil Pasic wrote: > I've also got code that deals with AIRQ_IV_CACHELINE by turning the > kmem_cache into a dma_pool. > > Cornelia, Sebastian which approach do you prefer: > 1) get rid of cio_dma_pool and AIRQ_IV_CACHELINE, and waste a page per > vector, or > 2) go with the approach taken by the patch below? We only have a couple of users for airq_iv: virtio_ccw.c: 2K bits pci w...
2013 Jan 14
5
[PATCH] mm/slab: add a leak decoder callback
This adds a leak decoder callback so that kmem_cache_destroy() can use to generate debugging output for the allocated objects. Callers like btrfs are using their own leak tracking which will manage allocated objects in a list(or something else), this does indeed the same thing as what slab does. So adding a callback for leak tracking can avoid this...
2019 May 20
0
[PATCH 05/10] s390/cio: introduce DMA pools to cio
On Thu, 16 May 2019 15:59:22 +0200 (CEST) Sebastian Ott <sebott at linux.ibm.com> wrote: > On Sun, 12 May 2019, Halil Pasic wrote: > > I've also got code that deals with AIRQ_IV_CACHELINE by turning the > > kmem_cache into a dma_pool. > > > > Cornelia, Sebastian which approach do you prefer: > > 1) get rid of cio_dma_pool and AIRQ_IV_CACHELINE, and waste a page per > > vector, or > > 2) go with the approach taken by the patch below? > > We only have a couple of users for air...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...00 Halil Pasic <pasic at linux.ibm.com> wrote: > Protected virtualization guests have to use shared pages for airq > notifier bit vectors, because hypervisor needs to write these bits. > > Let us make sure we allocate DMA memory for the notifier bit vectors by > replacing the kmem_cache with a dma_cache and kalloc() with > cio_dma_zalloc(). > > Signed-off-by: Halil Pasic <pasic at linux.ibm.com> > Reviewed-by: Sebastian Ott <sebott at linux.ibm.com> > --- > arch/s390/include/asm/airq.h | 2 ++ > drivers/s390/cio/airq.c | 32 ++++++++++++++++...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...00 Halil Pasic <pasic at linux.ibm.com> wrote: > Protected virtualization guests have to use shared pages for airq > notifier bit vectors, because hypervisor needs to write these bits. > > Let us make sure we allocate DMA memory for the notifier bit vectors by > replacing the kmem_cache with a dma_cache and kalloc() with > cio_dma_zalloc(). > > Signed-off-by: Halil Pasic <pasic at linux.ibm.com> > Reviewed-by: Sebastian Ott <sebott at linux.ibm.com> > --- > arch/s390/include/asm/airq.h | 2 ++ > drivers/s390/cio/airq.c | 32 ++++++++++++++++...
2019 May 22
1
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...change on top of the current implementation. I'm good with doing that and looking for further simplification/unification later. > Commit 414cbd1e3d14 "s390/airq: provide cacheline aligned > ivs" (Sebastian Ott, 2019-02-27) could have been smaller had you implemented > 'kmem_cache for everything' (and I would have had just to replace kmem_cache with > dma_cache to achieve option 3). For some reason you decided to keep the > iv->vector = kzalloc(size, GFP_KERNEL) code-path and make the client code request > iv->vector = kmem_cache_zalloc(airq_iv_cache, GFP_...
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
...o_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -13,6 +13,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/slab.h> #include <linux/mempool.h> @@ -771,8 +773,7 @@ static int __init init(void) virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); if (!virtscsi_cmd_cache) { - printk(KERN_ERR "kmem_cache_create() for " - "virtscsi_cmd_cache failed\n"); + pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); goto error; } @@ -781,8 +782,7 @@ static int __init init(void)...
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
...o_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -13,6 +13,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/slab.h> #include <linux/mempool.h> @@ -771,8 +773,7 @@ static int __init init(void) virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); if (!virtscsi_cmd_cache) { - printk(KERN_ERR "kmem_cache_create() for " - "virtscsi_cmd_cache failed\n"); + pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); goto error; } @@ -781,8 +782,7 @@ static int __init init(void)...
2014 Jan 08
2
[PATCH net-next v2 1/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill
On Wed, 2014-01-08 at 21:18 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 08, 2014 at 10:26:03AM -0800, Eric Dumazet wrote: > > On Wed, 2014-01-08 at 20:08 +0200, Michael S. Tsirkin wrote: > > > > > Eric said we also need a patch to add __GFP_NORETRY, right? > > > Probably before this one in series. > > > > Nope, this __GFP_NORETRY has nothing to do
2014 Jan 08
2
[PATCH net-next v2 1/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill
On Wed, 2014-01-08 at 21:18 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 08, 2014 at 10:26:03AM -0800, Eric Dumazet wrote: > > On Wed, 2014-01-08 at 20:08 +0200, Michael S. Tsirkin wrote: > > > > > Eric said we also need a patch to add __GFP_NORETRY, right? > > > Probably before this one in series. > > > > Nope, this __GFP_NORETRY has nothing to do
2019 Jun 11
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...nux.ibm.com> wrote: > > > Protected virtualization guests have to use shared pages for airq > > notifier bit vectors, because hypervisor needs to write these bits. > > > > Let us make sure we allocate DMA memory for the notifier bit vectors by > > replacing the kmem_cache with a dma_cache and kalloc() with > > cio_dma_zalloc(). > > > > Signed-off-by: Halil Pasic <pasic at linux.ibm.com> > > Reviewed-by: Sebastian Ott <sebott at linux.ibm.com> > > --- > > arch/s390/include/asm/airq.h | 2 ++ > > drivers/s390/ci...
2006 Mar 20
1
ARC cache issues with b35/b36; Bugs 6397610 / 6398177
> Bug ID: 6398177 > Synopsis: zfs: poor nightly build performance in 32-bit mode (high disk activity) Part of the problem appear to be these kmem_caches: # mdb -k ... > ::kmastat cache buf buf buf memory alloc alloc name size in use total in use succeed fail ------------------------- ------ ------ ------ --------- --------- ----- ... dmu_buf_impl_t 192 2029 10432...
2020 Feb 07
0
[RFC PATCH v7 47/78] KVM: introspection: add a jobs list to every introspected vCPU
...job_lock; }; struct kvm_introspection { diff --git a/virt/kvm/introspection/kvmi.c b/virt/kvm/introspection/kvmi.c index 655170ffb574..5149f8e06131 100644 --- a/virt/kvm/introspection/kvmi.c +++ b/virt/kvm/introspection/kvmi.c @@ -10,6 +10,7 @@ #include <linux/kthread.h> static struct kmem_cache *msg_cache; +static struct kmem_cache *job_cache; void *kvmi_msg_alloc(void) { @@ -33,14 +34,19 @@ static void kvmi_cache_destroy(void) { kmem_cache_destroy(msg_cache); msg_cache = NULL; + kmem_cache_destroy(job_cache); + job_cache = NULL; } static int kvmi_cache_create(void) { msg_...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...> > > Protected virtualization guests have to use shared pages for airq > > > notifier bit vectors, because hypervisor needs to write these bits. > > > > > > Let us make sure we allocate DMA memory for the notifier bit vectors by > > > replacing the kmem_cache with a dma_cache and kalloc() with > > > cio_dma_zalloc(). > > > > > > Signed-off-by: Halil Pasic <pasic at linux.ibm.com> > > > Reviewed-by: Sebastian Ott <sebott at linux.ibm.com> > > > --- > > > arch/s390/include/asm/airq.h | 2...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...> > > Protected virtualization guests have to use shared pages for airq > > > notifier bit vectors, because hypervisor needs to write these bits. > > > > > > Let us make sure we allocate DMA memory for the notifier bit vectors by > > > replacing the kmem_cache with a dma_cache and kalloc() with > > > cio_dma_zalloc(). > > > > > > Signed-off-by: Halil Pasic <pasic at linux.ibm.com> > > > Reviewed-by: Sebastian Ott <sebott at linux.ibm.com> > > > --- > > > arch/s390/include/asm/airq.h | 2...
2019 May 23
0
[PATCH v2 4/8] s390/airq: use DMA memory for adapter interrupts
From: Halil Pasic <pasic at linux.ibm.com> Protected virtualization guests have to use shared pages for airq notifier bit vectors, because hypervisor needs to write these bits. Let us make sure we allocate DMA memory for the notifier bit vectors by replacing the kmem_cache with a dma_cache and kalloc() with cio_dma_zalloc(). Signed-off-by: Halil Pasic <pasic at linux.ibm.com> --- arch/s390/include/asm/airq.h | 2 ++ drivers/s390/cio/airq.c | 32 ++++++++++++++++++++------------ drivers/s390/cio/cio.h | 2 ++ drivers/s390/cio/css.c | 1 + 4...