search for: cache_line_size

Displaying 20 results from an estimated 23 matches for "cache_line_size".

2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
......) > @@ -295,12 +303,12 @@ unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, > } > EXPORT_SYMBOL(airq_iv_scan); > > -static int __init airq_init(void) > +int __init airq_init(void) > { > - airq_iv_cache = kmem_cache_create("airq_iv_cache", cache_line_size(), > - cache_line_size(), 0, NULL); > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > + cache_line_size(), > + cache_line_size(), PAGE_SIZE); > if (!airq_iv_cache) > return -ENOMEM; Sorry about not noticing that in the last...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
......) > @@ -295,12 +303,12 @@ unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, > } > EXPORT_SYMBOL(airq_iv_scan); > > -static int __init airq_init(void) > +int __init airq_init(void) > { > - airq_iv_cache = kmem_cache_create("airq_iv_cache", cache_line_size(), > - cache_line_size(), 0, NULL); > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > + cache_line_size(), > + cache_line_size(), PAGE_SIZE); > if (!airq_iv_cache) > return -ENOMEM; Sorry about not noticing that in the last...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
..._scan(struct airq_iv *iv, unsigned long start, > > > } > > > EXPORT_SYMBOL(airq_iv_scan); > > > > > > -static int __init airq_init(void) > > > +int __init airq_init(void) > > > { > > > - airq_iv_cache = ) "airq_iv_cache", cache_line_size(), > > > - cache_line_size(), 0, NULL); > > > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > > > + cache_line_size(), > > > + cache_line_size(), PAGE_SIZE); > > > if (!airq_iv_cache) > > >...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
..._scan(struct airq_iv *iv, unsigned long start, > > > } > > > EXPORT_SYMBOL(airq_iv_scan); > > > > > > -static int __init airq_init(void) > > > +int __init airq_init(void) > > > { > > > - airq_iv_cache = ) "airq_iv_cache", cache_line_size(), > > > - cache_line_size(), 0, NULL); > > > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > > > + cache_line_size(), > > > + cache_line_size(), PAGE_SIZE); > > > if (!airq_iv_cache) > > >...
2019 Jun 12
0
[PATCH v5 4/8] s390/airq: use DMA memory for adapter interrupts
...he interrupt vector @@ -132,17 +139,19 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) goto out; iv->bits = bits; iv->flags = flags; - size = BITS_TO_LONGS(bits) * sizeof(unsigned long); + size = iv_size(bits); if (flags & AIRQ_IV_CACHELINE) { - if ((cache_line_size() * BITS_PER_BYTE) < bits) + if ((cache_line_size() * BITS_PER_BYTE) < bits + || !airq_iv_cache) goto out_free; - iv->vector = kmem_cache_zalloc(airq_iv_cache, GFP_KERNEL); + iv->vector = dma_pool_zalloc(airq_iv_cache, GFP_KERNEL, + &iv->vector_dma); if (!...
2019 Jun 12
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...long start, > > > > } > > > > EXPORT_SYMBOL(airq_iv_scan); > > > > > > > > -static int __init airq_init(void) > > > > +int __init airq_init(void) > > > > { > > > > - airq_iv_cache = ) "airq_iv_cache", cache_line_size(), > > > > - cache_line_size(), 0, NULL); > > > > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > > > > + cache_line_size(), > > > > + cache_line_size(), PAGE_SIZE); > > > > if (!airq_i...
2019 May 23
0
[PATCH v2 4/8] s390/airq: use DMA memory for adapter interrupts
...he interrupt vector @@ -132,17 +139,18 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) goto out; iv->bits = bits; iv->flags = flags; - size = BITS_TO_LONGS(bits) * sizeof(unsigned long); + size = iv_size(bits); if (flags & AIRQ_IV_CACHELINE) { if ((cache_line_size() * BITS_PER_BYTE) < bits) goto out_free; - iv->vector = kmem_cache_zalloc(airq_iv_cache, GFP_KERNEL); + iv->vector = dma_pool_zalloc(airq_iv_cache, GFP_KERNEL, + &iv->vector_dma); if (!iv->vector) goto out_free; } else { - iv->vector = kzalloc(size,...
2019 Jun 06
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...he interrupt vector @@ -132,17 +139,18 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) goto out; iv->bits = bits; iv->flags = flags; - size = BITS_TO_LONGS(bits) * sizeof(unsigned long); + size = iv_size(bits); if (flags & AIRQ_IV_CACHELINE) { if ((cache_line_size() * BITS_PER_BYTE) < bits) goto out_free; - iv->vector = kmem_cache_zalloc(airq_iv_cache, GFP_KERNEL); + iv->vector = dma_pool_zalloc(airq_iv_cache, GFP_KERNEL, + &iv->vector_dma); if (!iv->vector) goto out_free; } else { - iv->vector = kzalloc(size,...
2019 May 29
0
[PATCH v3 4/8] s390/airq: use DMA memory for adapter interrupts
...he interrupt vector @@ -132,17 +139,18 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) goto out; iv->bits = bits; iv->flags = flags; - size = BITS_TO_LONGS(bits) * sizeof(unsigned long); + size = iv_size(bits); if (flags & AIRQ_IV_CACHELINE) { if ((cache_line_size() * BITS_PER_BYTE) < bits) goto out_free; - iv->vector = kmem_cache_zalloc(airq_iv_cache, GFP_KERNEL); + iv->vector = dma_pool_zalloc(airq_iv_cache, GFP_KERNEL, + &iv->vector_dma); if (!iv->vector) goto out_free; } else { - iv->vector = kzalloc(size,...
2019 Jun 11
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...12 +303,12 @@ unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, > > } > > EXPORT_SYMBOL(airq_iv_scan); > > > > -static int __init airq_init(void) > > +int __init airq_init(void) > > { > > - airq_iv_cache = ) "airq_iv_cache", cache_line_size(), > > - cache_line_size(), 0, NULL); > > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > > + cache_line_size(), > > + cache_line_size(), PAGE_SIZE); > > if (!airq_iv_cache) > > return -ENOMEM; > > S...
2019 Jun 12
1
[PATCH v5 4/8] s390/airq: use DMA memory for adapter interrupts
...@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) > goto out; > iv->bits = bits; > iv->flags = flags; > - size = BITS_TO_LONGS(bits) * sizeof(unsigned long); > + size = iv_size(bits); > > if (flags & AIRQ_IV_CACHELINE) { > - if ((cache_line_size() * BITS_PER_BYTE) < bits) > + if ((cache_line_size() * BITS_PER_BYTE) < bits > + || !airq_iv_cache) I still think squashing this into the same if statement is a bit ugly, but not really an issue. > goto out_free; > > - iv->vector = kmem_cache_zalloc(airq_iv_cac...
2009 Jan 31
4
GPLPV Network Driver causing VM crash
I''m running Xen 3.3.0 with AMD Opteron 2350s. Windows 2003 32bit SP2+patches. When I bring a Windows VM up with the GPLPV drivers, it runs until I try to do anything with the network and then it crashes. Trying to web browse will lock the VM up, RDPing to it will lock the VM up. I''ve tried 0.9.11 and 0.9.12pre13, both with the same results. I''ve removed the
2019 Jun 12
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...e24a8ce 100644 > --- a/drivers/s390/cio/airq.c > +++ b/drivers/s390/cio/airq.c > @@ -142,7 +142,8 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) > size = iv_size(bits); > > if (flags & AIRQ_IV_CACHELINE) { > - if ((cache_line_size() * BITS_PER_BYTE) < bits) > + if ((cache_line_size() * BITS_PER_BYTE) < bits > + || !airq_iv_cache) It's perhaps a bit more readable if you keep checking for airq_iv_cache on a separate if statement, but that's a matter of taste, I g...
2019 Jun 12
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...e24a8ce 100644 > --- a/drivers/s390/cio/airq.c > +++ b/drivers/s390/cio/airq.c > @@ -142,7 +142,8 @@ struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags) > size = iv_size(bits); > > if (flags & AIRQ_IV_CACHELINE) { > - if ((cache_line_size() * BITS_PER_BYTE) < bits) > + if ((cache_line_size() * BITS_PER_BYTE) < bits > + || !airq_iv_cache) It's perhaps a bit more readable if you keep checking for airq_iv_cache on a separate if statement, but that's a matter of taste, I g...
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2016 Jun 13
0
[PATCH v8 2/5] ptr_ring: ring test
...fine _GNU_SOURCE +#include "main.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <pthread.h> +#include <malloc.h> +#include <assert.h> +#include <errno.h> +#include <limits.h> + +#define SMP_CACHE_BYTES 64 +#define cache_line_size() SMP_CACHE_BYTES +#define ____cacheline_aligned_in_smp __attribute__ ((aligned (SMP_CACHE_BYTES))) +#define unlikely(x) (__builtin_expect(!!(x), 0)) +#define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a)) +typedef pthread_spinlock_t spinlock_t; + +typedef int gfp_t; +static void *kzalloc(unsigned s...
2016 Jun 13
0
[PATCH v8 2/5] ptr_ring: ring test
...fine _GNU_SOURCE +#include "main.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <pthread.h> +#include <malloc.h> +#include <assert.h> +#include <errno.h> +#include <limits.h> + +#define SMP_CACHE_BYTES 64 +#define cache_line_size() SMP_CACHE_BYTES +#define ____cacheline_aligned_in_smp __attribute__ ((aligned (SMP_CACHE_BYTES))) +#define unlikely(x) (__builtin_expect(!!(x), 0)) +#define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a)) +typedef pthread_spinlock_t spinlock_t; + +typedef int gfp_t; +static void *kzalloc(unsigned s...
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV