Displaying 20 results from an estimated 24 matches for "airq_iv_cache".
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...4 files changed, 25 insertions(+), 12 deletions(-)
>
(...)
> @@ -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)
>...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...4 files changed, 25 insertions(+), 12 deletions(-)
>
(...)
> @@ -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)
>...
2019 Jun 12
0
[PATCH v5 4/8] s390/airq: use DMA memory for adapter interrupts
...pool.h>
#include <asm/airq.h>
#include <asm/isc.h>
+#include <asm/cio.h>
#include "cio.h"
#include "cio_debug.h"
@@ -27,7 +29,7 @@
static DEFINE_SPINLOCK(airq_lists_lock);
static struct hlist_head airq_lists[MAX_ISC+1];
-static struct kmem_cache *airq_iv_cache;
+static struct dma_pool *airq_iv_cache;
/**
* register_adapter_interrupt() - register adapter interrupt handler
@@ -115,6 +117,11 @@ void __init init_airq_interrupts(void)
setup_irq(THIN_INTERRUPT, &airq_interrupt);
}
+static inline unsigned long iv_size(unsigned long bits)
+{
+ retu...
2019 May 23
0
[PATCH v2 4/8] s390/airq: use DMA memory for adapter interrupts
...pool.h>
#include <asm/airq.h>
#include <asm/isc.h>
+#include <asm/cio.h>
#include "cio.h"
#include "cio_debug.h"
@@ -27,7 +29,7 @@
static DEFINE_SPINLOCK(airq_lists_lock);
static struct hlist_head airq_lists[MAX_ISC+1];
-static struct kmem_cache *airq_iv_cache;
+static struct dma_pool *airq_iv_cache;
/**
* register_adapter_interrupt() - register adapter interrupt handler
@@ -115,6 +117,11 @@ void __init init_airq_interrupts(void)
setup_irq(THIN_INTERRUPT, &airq_interrupt);
}
+static inline unsigned long iv_size(unsigned long bits)
+{
+ retu...
2019 Jun 06
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...pool.h>
#include <asm/airq.h>
#include <asm/isc.h>
+#include <asm/cio.h>
#include "cio.h"
#include "cio_debug.h"
@@ -27,7 +29,7 @@
static DEFINE_SPINLOCK(airq_lists_lock);
static struct hlist_head airq_lists[MAX_ISC+1];
-static struct kmem_cache *airq_iv_cache;
+static struct dma_pool *airq_iv_cache;
/**
* register_adapter_interrupt() - register adapter interrupt handler
@@ -115,6 +117,11 @@ void __init init_airq_interrupts(void)
setup_irq(THIN_INTERRUPT, &airq_interrupt);
}
+static inline unsigned long iv_size(unsigned long bits)
+{
+ retu...
2019 May 29
0
[PATCH v3 4/8] s390/airq: use DMA memory for adapter interrupts
...pool.h>
#include <asm/airq.h>
#include <asm/isc.h>
+#include <asm/cio.h>
#include "cio.h"
#include "cio_debug.h"
@@ -27,7 +29,7 @@
static DEFINE_SPINLOCK(airq_lists_lock);
static struct hlist_head airq_lists[MAX_ISC+1];
-static struct kmem_cache *airq_iv_cache;
+static struct dma_pool *airq_iv_cache;
/**
* register_adapter_interrupt() - register adapter interrupt handler
@@ -115,6 +117,11 @@ void __init init_airq_interrupts(void)
setup_irq(THIN_INTERRUPT, &airq_interrupt);
}
+static inline unsigned long iv_size(unsigned long bits)
+{
+ retu...
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 = ) "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);
> &...
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 = ) "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);
> &...
2019 Jun 12
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...ng 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()...
2019 Jun 11
0
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...t;
>
> (...)
>
> > @@ -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 = ) "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_c...
2019 Jun 12
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...> On Tue, 11 Jun 2019 18:19:44 +0200
> Cornelia Huck <cohuck at redhat.com> wrote:
>
> > On Tue, 11 Jun 2019 16:27:21 +0200
> > Halil Pasic <pasic at linux.ibm.com> wrote:
> > > IMHO the cleanest thing to do at this stage is to check if the
> > > airq_iv_cache is NULL and fail the allocation if it is (to preserve
> > > previous behavior).
> >
> > That's probably the least invasive fix for now. Did you check whether
> > any of the other dma pools this series introduces have a similar
> > problem due to init not fail...
2019 Jun 12
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...> On Tue, 11 Jun 2019 18:19:44 +0200
> Cornelia Huck <cohuck at redhat.com> wrote:
>
> > On Tue, 11 Jun 2019 16:27:21 +0200
> > Halil Pasic <pasic at linux.ibm.com> wrote:
> > > IMHO the cleanest thing to do at this stage is to check if the
> > > airq_iv_cache is NULL and fail the allocation if it is (to preserve
> > > previous behavior).
> >
> > That's probably the least invasive fix for now. Did you check whether
> > any of the other dma pools this series introduces have a similar
> > problem due to init not fail...
2019 Jun 12
1
[PATCH v5 4/8] s390/airq: use DMA memory for adapter interrupts
...t 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)
I still think squashing this into the same if statement is a bit ugly,
but not really an issue.
> goto out_free;
>
> - iv->ve...
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
...* While rebasing 's390/airq: use DMA memory for adapter interrupts' the
newly introduced kmem_cache was replaced with an equivalent dma_pool;
the kalloc() allocations are now replaced with cio_dma_zalloc()
allocations to avoid wasting almost a full page.
* Made virtio-ccw use the new AIRQ_IV_CACHELINE flag.
* fixed all remaining checkpatch issues
RFC --> v1:
* Fixed bugs found by Connie (may_reduce and handling reduced, warning,
split move -- thanks Connie!).
* Fixed console bug found by Sebastian (thanks Sebastian!).
* Removed the completely useless duplicate of dma-mapping.h spotted...
2019 Jun 06
15
[PATCH v4 0/8] s390: virtio: support protected virtualization
...* While rebasing 's390/airq: use DMA memory for adapter interrupts' the
newly introduced kmem_cache was replaced with an equivalent dma_pool;
the kalloc() allocations are now replaced with cio_dma_zalloc()
allocations to avoid wasting almost a full page.
* Made virtio-ccw use the new AIRQ_IV_CACHELINE flag.
* fixed all remaining checkpatch issues
RFC --> v1:
* Fixed bugs found by Connie (may_reduce and handling reduced, warning,
split move -- thanks Connie!).
* Fixed console bug found by Sebastian (thanks Sebastian!).
* Removed the completely useless duplicate of dma-mapping.h spotted...
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
...* While rebasing 's390/airq: use DMA memory for adapter interrupts' the
newly introduced kmem_cache was replaced with an equivalent dma_pool;
the kalloc() allocations are now replaced with cio_dma_zalloc()
allocations to avoid wasting almost a full page.
* Made virtio-ccw use the new AIRQ_IV_CACHELINE flag.
* fixed all remaining checkpatch issues
RFC --> v1:
* Fixed bugs found by Connie (may_reduce and handling reduced, warning,
split move -- thanks Connie!).
* Fixed console bug found by Sebastian (thanks Sebastian!).
* Removed the completely useless duplicate of dma-mapping.h spotted...
2019 Jun 12
21
[PATCH v5 0/8] s390: virtio: support protected virtualization
...* While rebasing 's390/airq: use DMA memory for adapter interrupts' the
newly introduced kmem_cache was replaced with an equivalent dma_pool;
the kalloc() allocations are now replaced with cio_dma_zalloc()
allocations to avoid wasting almost a full page.
* Made virtio-ccw use the new AIRQ_IV_CACHELINE flag.
* fixed all remaining checkpatch issues
RFC --> v1:
* Fixed bugs found by Connie (may_reduce and handling reduced, warning,
split move -- thanks Connie!).
* Fixed console bug found by Sebastian (thanks Sebastian!).
* Removed the completely useless duplicate of dma-mapping.h spotted...
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 air...
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 air...
2019 May 22
1
[PATCH 05/10] s390/cio: introduce DMA pools to cio
...bit vector)
> >
>
> I guess this is the same.
>
> >
> > The options are:
> > * page allocations for everything
>
> Worst case we need 20 + #max_pci_dev pages. At the moment we allocate
> from ZONE_DMA (!) and waste a lot.
>
> > * dma_pool for AIRQ_IV_CACHELINE ,gen_pool for others
>
> I prefer this. Explanation follows.
>
> > * dma_pool for everything
> >
>
> Less waste by factor factor 16.
>
> > I think we should do option 3 and use a dma_pool with cachesize
> > alignment for everything (as a prerequisi...