Re: [PATCH v3 28/34] s390/mm: Define KMSAN metadata for vmalloc and modules

2024-01-04 Thread Alexander Gordeev
On Tue, Jan 02, 2024 at 04:05:31PM +0100, Heiko Carstens wrote: Hi Heiko, ... > > @@ -253,9 +253,17 @@ static unsigned long setup_kernel_memory_layout(void) > > MODULES_END = round_down(__abs_lowcore, _SEGMENT_SIZE); > > MODULES_VADDR = MODULES_END - MODULES_LEN; > > VMALLOC_END =

Re: [PATCH v3 28/34] s390/mm: Define KMSAN metadata for vmalloc and modules

2023-12-21 Thread Alexander Gordeev
vmalloc_size = round_down(vmalloc_size / 3, _REGION3_SIZE); And thus, the alignment here should be _SEGMENT_SIZE as well. > + VMALLOC_END -= vmalloc_size * 2; > +#endif > VMALLOC_START = VMALLOC_END - vmalloc_size; > > /* split remaining virtual space between 1:1 mapping & vmemmap array */ ... With the above fixup: Acked-by: Alexander Gordeev Thanks!

Re: [PATCH 26/32] s390/mm: Define KMSAN metadata for vmalloc and modules

2023-11-17 Thread Alexander Gordeev
On Thu, Nov 16, 2023 at 04:03:13PM +0100, Alexander Potapenko wrote: Hi Alexander! > > /* allow vmalloc area to occupy up to about 1/2 of the rest virtual > > space left */ > > vmalloc_size = min(vmalloc_size, round_down(VMALLOC_END / 2, > > _REGION3_SIZE)); > > +#ifdef

Re: [PATCH] printk: fix buffer overflow potential for print_text()

2021-02-26 Thread Alexander Gordeev
On Thu, Jan 14, 2021 at 06:10:12PM +0106, John Ogness wrote: > Before commit b6cf8b3f3312 ("printk: add lockless ringbuffer"), > msg_print_text() would only write up to size-1 bytes into the > provided buffer. Some callers expect this behavior and append > a terminator to returned string. In

Re: [PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-12-03 Thread Alexander Gordeev
On Thu, Dec 03, 2020 at 09:14:22AM -0800, Andy Lutomirski wrote: > > > > On Dec 3, 2020, at 9:09 AM, Alexander Gordeev > > wrote: > > > > On Mon, Nov 30, 2020 at 10:31:51AM -0800, Andy Lutomirski wrote: > >> other arch folk: there's some ba

Re: [PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-12-03 Thread Alexander Gordeev
On Mon, Nov 30, 2020 at 10:31:51AM -0800, Andy Lutomirski wrote: > other arch folk: there's some background here: > > https://lkml.kernel.org/r/calcetrvxube8lfnn-qs+dzroqaiw+sfug1j047ybyv31sat...@mail.gmail.com > > On Sun, Nov 29, 2020 at 12:16 PM Andy Lutomirski wrote: > > > > On Sat, Nov 28,

[PATCH v3] s390/pci: fix CPU address in MSI for directed IRQ

2020-11-26 Thread Alexander Gordeev
instruction. That value does not necessarily match the kernel logical CPU number. Fixes: e979ce7bced2 ("s390/pci: provide support for CPU directed interrupts") Signed-off-by: Alexander Gordeev --- arch/s390/pci/pci_irq.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-)

Re: [PATCH] selftests/ftrace: remove _do_fork() leftovers

2020-10-23 Thread Alexander Gordeev
On Fri, Oct 23, 2020 at 09:35:23AM -0400, Steven Rostedt wrote: > On Fri, 23 Oct 2020 10:52:03 +0200 > Alexander Gordeev wrote: > > > diff --git > > a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-notrace-pid.tc > > b/tools/testing/selftests/ftrace/test.d

[PATCH] selftests/ftrace: remove _do_fork() leftovers

2020-10-23 Thread Alexander Gordeev
The _do_fork() is not completely removed from selftests in favor of the kernel_clone(). Fixes: eea11285dab3 ("tracing: switch to kernel_clone()") Cc: Steven Rostedt Cc: Christian Brauner Cc: Masami Hiramatsu Signed-off-by: Alexander Gordeev --- tools/testing/selftests/ftrace/tes

Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding

2020-09-11 Thread Alexander Gordeev
On Thu, Sep 10, 2020 at 07:11:16PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 10, 2020 at 02:22:37PM -0700, John Hubbard wrote: > > > Or am I way off here, and it really is possible (aside from the current > > s390 situation) to observe something that "is no longer a page table"? > > Yes, that

Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding

2020-09-10 Thread Alexander Gordeev
On Wed, Sep 09, 2020 at 03:03:24PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 09, 2020 at 07:25:34PM +0200, Gerald Schaefer wrote: > > I actually had to draw myself a picture to get some hold of > > this, or rather a walk-through with a certain pud-crossing > > range in a folded 3-level scenario.

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 07:14:38AM +0200, Christophe Leroy wrote: [...] > You forgot arch/powerpc/mm/book3s64/subpage_prot.c it seems. If this one would be okay? diff --git a/arch/powerpc/mm/book3s64/subpage_prot.c b/arch/powerpc/mm/book3s64/subpage_prot.c index 60c6ea16..3690d22 100644 ---

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 10:16:49AM +0200, Christophe Leroy wrote: > >Yes, and also two more sources :/ > > arch/powerpc/mm/kasan/8xx.c > > arch/powerpc/mm/kasan/kasan_init_32.c > > > >But these two are not quite obvious wrt pgd_addr_end() used > >while traversing pmds. Could you please

Re: [RFC PATCH v2 3/3] mm: make generic pXd_addr_end() macros inline functions

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 07:19:38AM +0200, Christophe Leroy wrote: [...] > >diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h > >index 67ebc22cf83d..d9e7d16c2263 100644 > >--- a/include/linux/pgtable.h > >+++ b/include/linux/pgtable.h > >@@ -656,31 +656,35 @@ static inline int

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 07:14:38AM +0200, Christophe Leroy wrote: > You forgot arch/powerpc/mm/book3s64/subpage_prot.c it seems. Yes, and also two more sources :/ arch/powerpc/mm/kasan/8xx.c arch/powerpc/mm/kasan/kasan_init_32.c But these two are not quite obvious wrt

[PATCH v3 1/2] perf bench numa: use numa_node_to_cpus() to bind tasks to nodes

2020-08-13 Thread Alexander Gordeev
Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/tools/perf/bench/numa.c b/tools/perf/bench

[PATCH v3 1/2] perf bench numa: fix cpumask memory leak in node_has_cpus()

2020-08-13 Thread Alexander Gordeev
Couple numa_allocate_cpumask() and numa_free_cpumask() functions Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 31e2601..9066511 100644

Re: [PATCH v2 1/3] perf bench numa: use numa_node_to_cpus() to bind tasks to nodes

2020-08-11 Thread Alexander Gordeev
On Tue, Aug 11, 2020 at 04:26:50PM +0900, Namhyung Kim wrote: > Hello, > > On Mon, Aug 10, 2020 at 3:22 PM Alexander Gordeev > wrote: > > > > It is currently assumed that each node contains at most > > nr_cpus/nr_nodes CPUs and node CPU ranges do not overlap. &g

[PATCH] docs/vm: fix 'mm_count' vs 'mm_users' counter confusion

2020-08-10 Thread Alexander Gordeev
In the context of the anonymous address space lifespan description the 'mm_users' reference counter is confused with 'mm_count'. I.e a "zombie" mm gets released when "mm_count" becomes zero, not "mm_users". Cc: Jonathan Corbet Cc: Andrew Morton Si

[PATCH v2 2/3] perf bench numa: fix number of processes in "2x3-convergence" test

2020-08-10 Thread Alexander Gordeev
Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/bench/numa.c b

[PATCH v2 0/3] perf bench numa: make possible testing on uneven and/or overlapping CPU ranges

2020-08-10 Thread Alexander Gordeev
: - numa01* and numa02* test names left intact; - "2x3-convergence" fix moved out to separate patch Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Alexander Gordeev (3): perf bench

[PATCH v2 1/3] perf bench numa: use numa_node_to_cpus() to bind tasks to nodes

2020-08-10 Thread Alexander Gordeev
: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 5797253

[PATCH v2 3/3] perf bench numa: fix benchmark names

2020-08-10 Thread Alexander Gordeev
whitespace and comment inconsistencies. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 35 +-- 1 file c

Re: [PATCH v5 18/25] mm/s390: Use general page fault accounting

2020-07-07 Thread Alexander Gordeev
On Tue, Jul 07, 2020 at 06:50:14PM -0400, Peter Xu wrote: > Use the general page fault accounting by passing regs into handle_mm_fault(). > It naturally solve the issue of multiple page fault accounting when page fault > retry happened. > > CC: Heiko Carstens > CC: Vasily Gorbik > CC: Christian

Re: [PATCH V4 0/4] mm/debug_vm_pgtable: Add some more tests

2020-07-06 Thread Alexander Gordeev
On Mon, Jul 06, 2020 at 06:18:32AM +0530, Anshuman Khandual wrote: [...] > Tested on arm64, x86 platforms but only build tested on all other enabled > platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The Sorry for missing to test earlier. Works for me on s390. Also, tried

[PATCH 3/3] perf bench numa: fix wrong benchmark configuration

2020-07-06 Thread Alexander Gordeev
This update fixes a wrong number of processes for one benchmark and consolidates two others in a unified way. Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c

[PATCH 2/3] perf bench numa: fix benchmark names

2020-07-06 Thread Alexander Gordeev
Several benchmarks have names that do not correspond to their configuration. Fix that and also some whitespace inconsistencies. Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff

[PATCH 0/3] perf bench numa: fix few minor issues

2020-07-06 Thread Alexander Gordeev
Hi all, Please, find couple of fixes to the tool. Note, I did not bother fixing leaked memory allocated with numa_allocate_cpumask(). Alexander Gordeev (3): perf bench numa: fix incorrect NUMA toplogy assumption perf bench numa: fix benchmark names perf bench numa: fix wrong benchmark

[PATCH 1/3] perf bench numa: fix incorrect NUMA toplogy assumption

2020-07-06 Thread Alexander Gordeev
The current code assumes that CPUs are evenly spread among NUMA nodes. That is generally incorrect and leads to failure on systems that have different NUMA topology. Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 27 +-- 1 file changed, 13 insertions

[PATCH v2 1/3] perf bench numa: fix incorrect NUMA toplogy assumption

2020-06-30 Thread Alexander Gordeev
The current code assumes that CPUs are evenly spread among NUMA nodes. That is generally incorrect and leads to failure on systems that have different NUMA topology. Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 27

Re: [PATCH 1/3] perf bench numa: fix incorrect NUMA toplogy assumption

2020-06-30 Thread Alexander Gordeev
On Mon, Jun 29, 2020 at 05:50:07PM +0200, Alexander Gordeev wrote: > The current code assumes that CPUs are evenly spread among > NUMA nodes. That is generally incorrect and leads to failure > on systems that have different NUMA topology. > > Cc: Arnaldo Carvalho de Melo &g

[PATCH 0/3] perf bench numa: fix few minor issues

2020-06-29 Thread Alexander Gordeev
Hi all, Please, find couple of fixes to the tool. Note, I did not bother fixing leaked memory allocated with numa_allocate_cpumask(). Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Alexander Gordeev (3): perf bench numa: fix incorrect NUMA toplogy assumption perf bench numa: fix benchmark

[PATCH 2/3] perf bench numa: fix benchmark names

2020-06-29 Thread Alexander Gordeev
Several benchmarks have names that do not correspond to their configuration. Fix that and also some whitespace inconsistencies. Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 42 +- 1 file

[PATCH 1/3] perf bench numa: fix incorrect NUMA toplogy assumption

2020-06-29 Thread Alexander Gordeev
The current code assumes that CPUs are evenly spread among NUMA nodes. That is generally incorrect and leads to failure on systems that have different NUMA topology. Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 27

[PATCH 3/3] perf bench numa: fix wrong benchmark configuration

2020-06-29 Thread Alexander Gordeev
This update fixes a wrong number of processes for one benchmark and re-groups two others in a more unified way. Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Signed-off-by: Alexander Gordeev --- tools/perf/bench/numa.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

Re: [PATCH V3 0/4] mm/debug_vm_pgtable: Add some more tests

2020-06-24 Thread Alexander Gordeev
On Wed, Jun 24, 2020 at 01:48:08PM +0200, Gerald Schaefer wrote: > On Wed, 24 Jun 2020 13:05:39 +0200 > Alexander Gordeev wrote: > > > On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: > > > > [...] > > > > > Hello Gerald/Christop

Re: [PATCH V3 0/4] mm/debug_vm_pgtable: Add some more tests

2020-06-24 Thread Alexander Gordeev
On Wed, Jun 24, 2020 at 08:43:10AM +0530, Anshuman Khandual wrote: [...] > Hello Gerald/Christophe/Vineet, > > It would be really great if you could give this series a quick test > on s390/ppc/arc platforms respectively. Thank you. That worked for me with the default and debug s390

Re: [PATCH 19/25] mm/s390: Use mm_fault_accounting()

2020-06-16 Thread Alexander Gordeev
On Mon, Jun 15, 2020 at 06:23:02PM -0400, Peter Xu wrote: > Use the new mm_fault_accounting() helper for page fault accounting. > > Avoid doing page fault accounting multiple times if the page fault is retried. > > CC: Heiko Carstens > CC: Vasily Gorbik > CC: Christian Borntraeger > CC:

Re: [PATCH 2/2] bitmap: Add test for bitmap_cut()

2020-06-15 Thread Alexander Gordeev
On Mon, Jun 15, 2020 at 12:46:16PM +0300, Andy Shevchenko wrote: > On Mon, Jun 15, 2020 at 12:41:55PM +0300, Andy Shevchenko wrote: > > On Sun, Jun 14, 2020 at 07:40:54PM +0200, Stefano Brivio wrote: > > > Inspired by an original patch from Yury Norov: introduce a test for > > > bitmap_cut() that

Re: [PATCH v1] lib/bitmap: Convert infinite while loop to for one

2020-06-09 Thread Alexander Gordeev
On Tue, Jun 09, 2020 at 05:05:35PM +0300, Andy Shevchenko wrote: > Convert infinite while loop to for one in order to be more explicit > in one place what we are doing with chunks. Reviewed-by: Alexander Gordeev > > Signed-off-by: Andy Shevchenko > --- > > Andre

[PATCH v2] lib: fix bitmap_parse() on 64-bit big endian archs

2020-06-08 Thread Alexander Gordeev
quot;Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Alexander Gordeev --- lib/bitmap.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 89260aa342d6..80d26b183248 100644 --- a/lib/bitmap.c ++

Re: [PATCH RESEND2] lib: fix bitmap_parse() on 64-bit big endian archs

2020-06-08 Thread Alexander Gordeev
On Mon, Jun 08, 2020 at 03:03:05PM +0300, Andy Shevchenko wrote: > On Mon, Jun 8, 2020 at 1:26 PM Alexander Gordeev > wrote: > > > > Commit 2d6261583be0 ("lib: rework bitmap_parse()") does not > > take into account order of halfwords on 64-bit big endian >

Re: [PATCH RESEND] lib: fix bitmap_parse() on 64-bit big endian archs

2020-06-08 Thread Alexander Gordeev
On Fri, Jun 05, 2020 at 04:25:58PM +0300, Andy Shevchenko wrote: > Test case, please. Hi Andy, Below is the output of the runtime kernel test "test_bitmap". I resent the patch with Andrew Morton on CC, but did not include the excessive test output: test_bitmap: parse: 4: input is 1, result is

[PATCH RESEND2] lib: fix bitmap_parse() on 64-bit big endian archs

2020-06-08 Thread Alexander Gordeev
quot;Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Alexander Gordeev --- lib/bitmap.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 89260aa342d6..a725e4612984 100644 --- a/l

Re: [PATCH RESEND] lib: fix bitmap_parse() on 64-bit big endian archs

2020-06-02 Thread Alexander Gordeev
On Mon, May 18, 2020 at 01:50:59PM +0200, Alexander Gordeev wrote: > On Mon, May 18, 2020 at 02:33:43PM +0300, Andy Shevchenko wrote: > > On Mon, May 18, 2020 at 1:40 PM Alexander Gordeev > > wrote: > > > > > > Commit 2d6261583be0 ("lib: rework bitmap_pars

Re: [PATCH RESEND] lib: fix bitmap_parse() on 64-bit big endian archs

2020-05-18 Thread Alexander Gordeev
On Mon, May 18, 2020 at 02:33:43PM +0300, Andy Shevchenko wrote: > On Mon, May 18, 2020 at 1:40 PM Alexander Gordeev > wrote: > > > > Commit 2d6261583be0 ("lib: rework bitmap_parse()") does > > not take into account order of halfwords on 64-bit big > > endi

[PATCH RESEND] lib: fix bitmap_parse() on 64-bit big endian archs

2020-05-18 Thread Alexander Gordeev
ldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Alexander Gordeev --- lib/bitmap.c | 20 ++

[PATCH] lib: fix bitmap_parse() on 64-bit big endian archs

2020-05-12 Thread Alexander Gordeev
Commit 2d626158 ("lib: rework bitmap_parse()") does not take into account order of halfwords on 64-bit big endian architectures. Cc: Yury Norov Signed-off-by: Alexander Gordeev --- lib/bitmap.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff -

[PATCH v3 0/1] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-16 Thread Alexander Gordeev
rity by examining RAM contents from host CPU (indirectly - checking data DMAed to the system) and from Nios CPU that has direct access to the device RAM. A companion tool using "avalon-test" driver was used to DMA files to the device: https://github.com/a-gordeev/avalon-tool.git CC: dm

[PATCH v3 1/1] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-16 Thread Alexander Gordeev
Support Avalon-MM DMA Interface for PCIe used in hard IPs for Intel Arria, Cyclone or Stratix FPGAs. CC: dmaeng...@vger.kernel.org Signed-off-by: Alexander Gordeev --- drivers/dma/Kconfig | 2 + drivers/dma/Makefile | 1 + drivers/dma/avalon/Kconfig | 14

Re: [PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-15 Thread Alexander Gordeev
On Tue, Oct 15, 2019 at 04:19:55PM +0300, Dan Carpenter wrote: > On Tue, Oct 15, 2019 at 01:24:50PM +0200, Alexander Gordeev wrote: > > On Thu, Oct 10, 2019 at 02:30:34PM +0300, Dan Carpenter wrote: > > > On Thu, Oct 10, 2019 at 10:51:45AM +0200, Alexander Gordeev wrote: >

Re: [PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-15 Thread Alexander Gordeev
On Tue, Oct 15, 2019 at 04:03:21PM +0530, Vinod Koul wrote: > what kind of device is this? I dont think we want these and the ones > coming below as part of kernel kconfig! Yes, I have already been pointed out on this and will put those as kernel module parameters in the next version. The device

Re: [PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-15 Thread Alexander Gordeev
On Tue, Oct 15, 2019 at 02:41:08PM +0300, Dan Carpenter wrote: > > > > > > > > + spin_lock(lock); > > > > [*] > > [ snip ] > > > I struggle to realize how the spinlock I use (see [*] above) does not > > protect the reader. > > Argh I'm really sorry. I completely didn't see the

Re: [PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-15 Thread Alexander Gordeev
On Thu, Oct 10, 2019 at 02:30:34PM +0300, Dan Carpenter wrote: > On Thu, Oct 10, 2019 at 10:51:45AM +0200, Alexander Gordeev wrote: > > On Wed, Oct 09, 2019 at 09:53:23PM +0300, Dan Carpenter wrote: > > > > > > + u32 *rd_flags = hw->dma_desc_table_rd.cpu_ad

Re: [PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-10 Thread Alexander Gordeev
On Wed, Oct 09, 2019 at 09:53:23PM +0300, Dan Carpenter wrote: > > > > + u32 *rd_flags = hw->dma_desc_table_rd.cpu_addr->flags; > > > > + u32 *wr_flags = hw->dma_desc_table_wr.cpu_addr->flags; > > > > + struct avalon_dma_desc *desc; > > > > + struct virt_dma_desc *vdesc; >

Re: [PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-09 Thread Alexander Gordeev
On Wed, Oct 09, 2019 at 03:14:41PM +0300, Dan Carpenter wrote: > > +config AVALON_DMA_PCI_VENDOR_ID > > + hex "PCI vendor ID" > > + default "0x1172" > > + > > +config AVALON_DMA_PCI_DEVICE_ID > > + hex "PCI device ID" > > + default "0xe003" > > This feels wrong. Why isn't it known in

Re: [PATCH RFC 0/2] staging: Support Avalon-MM DMA Interface for PCIe

2019-10-09 Thread Alexander Gordeev
On Thu, Sep 19, 2019 at 01:37:08PM +0200, Greg KH wrote: > Why is this being submitted for drivers/staging/ and not the "real" part > of the kernel tree? Hi Greg! I sent v2 of the patchset, but it does not need to be part of the staging tree. I CC-ed de...@driverdev.osuosl.org for reference.

[PATCH RFC v2 2/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe test

2019-10-09 Thread Alexander Gordeev
ol.git CC: Michael Chen CC: de...@driverdev.osuosl.org CC: dmaeng...@vger.kernel.org Signed-off-by: Alexander Gordeev --- drivers/dma/Kconfig | 1 + drivers/dma/Makefile| 1 + drivers/dma/avalon-test/Kconfig | 23 + drivers/dma/avalon-tes

[PATCH v2 0/2] dmaengine: avalon: Support Avalon-MM DMA Interface for PCIe

2019-10-09 Thread Alexander Gordeev
ta integrity by examining RAM contents from host CPU (indirectly - checking data DMAed to the system) and from Nios CPU that has direct access to the device RAM. A companion tool using "avalon-test" driver was used to DMA files to the device: https://github.com/a-gordeev/avalon-tool.git C

[PATCH v2 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe

2019-10-09 Thread Alexander Gordeev
Support Avalon-MM DMA Interface for PCIe used in hard IPs for Intel Arria, Cyclone or Stratix FPGAs. CC: Michael Chen CC: de...@driverdev.osuosl.org CC: dmaeng...@vger.kernel.org Signed-off-by: Alexander Gordeev --- drivers/dma/Kconfig | 2 + drivers/dma/Makefile

[PATCH RFC 2/2] staging: avalon-drv: Avalon DMA driver

2019-09-19 Thread Alexander Gordeev
ol.git CC: Michael Chen CC: de...@driverdev.osuosl.org CC: dmaeng...@vger.kernel.org Signed-off-by: Alexander Gordeev --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/avalon-drv/Kconfig| 34 + drivers/stag

[PATCH RFC 0/2] staging: Support Avalon-MM DMA Interface for PCIe

2019-09-19 Thread Alexander Gordeev
ting - I only have access to a single Arria 10 device to try on. This series is against v5.3 and could be found at g...@github.com:a-gordeev/linux.git avalon-dma-engine CC: Michael Chen CC: de...@driverdev.osuosl.org CC: dmaeng...@vger.kernel.org Alexander Gordeev (2): staging: avalon-dma

[PATCH RFC 1/2] staging: avalon-dma: Avalon DMA engine

2019-09-19 Thread Alexander Gordeev
contiguous buffers, scatterlists and DMA completion callbacks - much like "dmaengine" does. CC: Michael Chen CC: de...@driverdev.osuosl.org CC: dmaeng...@vger.kernel.org Signed-off-by: Alexander Gordeev --- drivers/staging/Kconfig | 2 + drivers/stagin

[PATCH v3 7/8] blk-mq: Pair blk_mq_hctx_kobj_init() with blk_mq_hctx_kobj_put()

2016-10-09 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq-sysfs.c | 5 + block/blk-mq.c | 2 +- block/blk-mq.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c

[PATCH v3 7/8] blk-mq: Pair blk_mq_hctx_kobj_init() with blk_mq_hctx_kobj_put()

2016-10-09 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev --- block/blk-mq-sysfs.c | 5 + block/blk-mq.c | 2 +- block/blk-mq.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index 01fb455..11846d0 100644

[PATCH v3 6/8] blk-mq: Rework blk_mq_realloc_hw_ctxs()

2016-10-09 Thread Alexander Gordeev
Rework blk_mq_realloc_hw_ctxs() so deallocation is done in order reverse to allocation and indentation is bit more easy to read. CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 40 ++-- 1 file c

[PATCH v3 6/8] blk-mq: Rework blk_mq_realloc_hw_ctxs()

2016-10-09 Thread Alexander Gordeev
Rework blk_mq_realloc_hw_ctxs() so deallocation is done in order reverse to allocation and indentation is bit more easy to read. CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 40 ++-- 1 file changed, 22 insertions

Re: [PATCH v2 6/8] blk-mq: Rework blk_mq_realloc_hw_ctxs()

2016-10-06 Thread Alexander Gordeev
On Thu, Oct 06, 2016 at 12:47:26AM +0300, Sagi Grimberg wrote: > > >@@ -1908,33 +1909,36 @@ static void blk_mq_realloc_hw_ctxs(struct > >blk_mq_tag_set *set, > > if (node == NUMA_NO_NODE) > > node = set->numa_node; > > > >-hctxs[i] =

Re: [PATCH v2 6/8] blk-mq: Rework blk_mq_realloc_hw_ctxs()

2016-10-06 Thread Alexander Gordeev
On Thu, Oct 06, 2016 at 12:47:26AM +0300, Sagi Grimberg wrote: > > >@@ -1908,33 +1909,36 @@ static void blk_mq_realloc_hw_ctxs(struct > >blk_mq_tag_set *set, > > if (node == NUMA_NO_NODE) > > node = set->numa_node; > > > >-hctxs[i] =

[PATCH v2 1/8] block: Get rid of unused request_queue::nr_queues member

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval <osan...@fb.com> Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 2 -- include/linux/blkdev.h | 1 - 2 files changed, 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 0be5

[PATCH v2 1/8] block: Get rid of unused request_queue::nr_queues member

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 2 -- include/linux/blkdev.h | 1 - 2 files changed, 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 0be5577..c96a168 100644 --- a/block/blk-mq.c +++ b

[PATCH v2 2/8] blk-mq: Remove a redundant assignment

2016-09-30 Thread Alexander Gordeev
blk_mq_hw_ctx::queue_num is initialized in blk_mq_init_hctx() function. CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval <osan...@fb.com> Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-

[PATCH v2 2/8] blk-mq: Remove a redundant assignment

2016-09-30 Thread Alexander Gordeev
blk_mq_hw_ctx::queue_num is initialized in blk_mq_init_hctx() function. CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index c96a168..92c2519

[PATCH v2 4/8] blk-mq: Cleanup a loop exit condition

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval <osan...@fb.com> Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index e3e9b23..eed

[PATCH v2 7/8] blk-mq: Pair blk_mq_hctx_kobj_init() with blk_mq_hctx_kobj_put()

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq-sysfs.c | 5 + block/blk-mq.c | 2 +- block/blk-mq.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c

[PATCH v2 4/8] blk-mq: Cleanup a loop exit condition

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index e3e9b23..eed6e348 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c

[PATCH v2 7/8] blk-mq: Pair blk_mq_hctx_kobj_init() with blk_mq_hctx_kobj_put()

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev --- block/blk-mq-sysfs.c | 5 + block/blk-mq.c | 2 +- block/blk-mq.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index 01fb455..11846d0 100644

[PATCH v2 8/8] blk-mq: Cleanup (de-)allocation of blk_mq_hw_ctx::ctxs

2016-09-30 Thread Alexander Gordeev
n. CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 78ee5af..03654af 100644 --- a/block/bl

[PATCH v2 5/8] blk-mq: Cleanup blk_mq_hw_ctx::cpumask (de-)allocation

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 37 +++-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index eed6e348..15c03c2 100644 --- a/block/bl

[PATCH v2 8/8] blk-mq: Cleanup (de-)allocation of blk_mq_hw_ctx::ctxs

2016-09-30 Thread Alexander Gordeev
n. CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 78ee5af..03654af 100644 --- a/block/blk-mq.c +++ b/block/blk-

[PATCH v2 5/8] blk-mq: Cleanup blk_mq_hw_ctx::cpumask (de-)allocation

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 37 +++-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index eed6e348..15c03c2 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c

[PATCH v2 6/8] blk-mq: Rework blk_mq_realloc_hw_ctxs()

2016-09-30 Thread Alexander Gordeev
Rework blk_mq_realloc_hw_ctxs() so deallocation is done in order reverse to allocation and indentation is bit more easy to read. CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 40 ++-- 1 file c

[PATCH v2 6/8] blk-mq: Rework blk_mq_realloc_hw_ctxs()

2016-09-30 Thread Alexander Gordeev
Rework blk_mq_realloc_hw_ctxs() so deallocation is done in order reverse to allocation and indentation is bit more easy to read. CC: linux-bl...@vger.kernel.org Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 40 ++-- 1 file changed, 22 insertions

[PATCH v2 3/8] blk-mq: Fix hardware context data node selection

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval <osan...@fb.com> Signed-off-by: Alexander Gordeev <agord...@redhat.com> --- block/blk-mq.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 92c2519..e3

[PATCH v2 3/8] blk-mq: Fix hardware context data node selection

2016-09-30 Thread Alexander Gordeev
CC: linux-bl...@vger.kernel.org Reviewed-by: Omar Sandoval Signed-off-by: Alexander Gordeev --- block/blk-mq.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 92c2519..e3e9b23 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c

[PATCH v2 0/8] blk-mq: Minor cleanups

2016-09-30 Thread Alexander Gordeev
Hello, The series is against: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next Thanks! CC: linux-bl...@vger.kernel.org Alexander Gordeev (8): block: Get rid of unused request_queue::nr_queues member blk-mq: Remove a redundant assignment blk-mq: Fix hardware

[PATCH v2 0/8] blk-mq: Minor cleanups

2016-09-30 Thread Alexander Gordeev
Hello, The series is against: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next Thanks! CC: linux-bl...@vger.kernel.org Alexander Gordeev (8): block: Get rid of unused request_queue::nr_queues member blk-mq: Remove a redundant assignment blk-mq: Fix hardware

Re: [PATCH 03/13] genirq/msi: Switch to new irq spreading infrastructure

2016-09-22 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:49PM +0200, Christoph Hellwig wrote: > static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, > - struct msix_entry *entries, int nvec) > + struct msix_entry *entries, int nvec, > +

Re: [PATCH 03/13] genirq/msi: Switch to new irq spreading infrastructure

2016-09-22 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:49PM +0200, Christoph Hellwig wrote: > static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, > - struct msix_entry *entries, int nvec) > + struct msix_entry *entries, int nvec, > +

Re: [PATCH 02/13] genirq/affinity: Provide smarter irq spreading infrastructure

2016-09-21 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:48PM +0200, Christoph Hellwig wrote: > +/** > + * irq_calc_affinity_vectors - Calculate to optimal number of vectors for a > given affinity mask > + * @affinity:The affinity mask to spread. If NULL > cpu_online_mask > + * is used >

Re: [PATCH 02/13] genirq/affinity: Provide smarter irq spreading infrastructure

2016-09-21 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:48PM +0200, Christoph Hellwig wrote: > +/** > + * irq_calc_affinity_vectors - Calculate to optimal number of vectors for a > given affinity mask > + * @affinity:The affinity mask to spread. If NULL > cpu_online_mask > + * is used >

Re: [PATCH 03/13] genirq/msi: Switch to new irq spreading infrastructure

2016-09-21 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:49PM +0200, Christoph Hellwig wrote: > @@ -1039,6 +1058,7 @@ EXPORT_SYMBOL(pci_msi_enabled); > static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int > maxvec, > unsigned int flags) > { > + bool affinity = flags & PCI_IRQ_AFFINITY;

Re: [PATCH 03/13] genirq/msi: Switch to new irq spreading infrastructure

2016-09-21 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:49PM +0200, Christoph Hellwig wrote: > @@ -1039,6 +1058,7 @@ EXPORT_SYMBOL(pci_msi_enabled); > static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int > maxvec, > unsigned int flags) > { > + bool affinity = flags & PCI_IRQ_AFFINITY;

Re: [PATCH 04/14] blk-mq: Do not limit number of queues to 'nr_cpu_ids' in allocations

2016-09-20 Thread Alexander Gordeev
On Mon, Sep 19, 2016 at 10:48:49AM -0700, Omar Sandoval wrote: > On Sun, Sep 18, 2016 at 09:37:14AM +0200, Alexander Gordeev wrote: > > Currently maximum number of used hardware queues is limited to > > number of CPUs in the system. However, using 'nr_cpu_ids' as > > the limit

Re: [PATCH 04/14] blk-mq: Do not limit number of queues to 'nr_cpu_ids' in allocations

2016-09-20 Thread Alexander Gordeev
On Mon, Sep 19, 2016 at 10:48:49AM -0700, Omar Sandoval wrote: > On Sun, Sep 18, 2016 at 09:37:14AM +0200, Alexander Gordeev wrote: > > Currently maximum number of used hardware queues is limited to > > number of CPUs in the system. However, using 'nr_cpu_ids' as > > the limit

Re: [PATCH 07/14] blk-mq: Cleanup a loop exit condition

2016-09-20 Thread Alexander Gordeev
On Mon, Sep 19, 2016 at 12:00:28PM -0700, Omar Sandoval wrote: > On Sun, Sep 18, 2016 at 09:37:17AM +0200, Alexander Gordeev wrote: > > CC: linux-bl...@vger.kernel.org > > Signed-off-by: Alexander Gordeev <agord...@redhat.com> > > So set->nr_hw_queues is al

Re: [PATCH 07/14] blk-mq: Cleanup a loop exit condition

2016-09-20 Thread Alexander Gordeev
On Mon, Sep 19, 2016 at 12:00:28PM -0700, Omar Sandoval wrote: > On Sun, Sep 18, 2016 at 09:37:17AM +0200, Alexander Gordeev wrote: > > CC: linux-bl...@vger.kernel.org > > Signed-off-by: Alexander Gordeev > > So set->nr_hw_queues is always >= q->nr_hw_queues, right?

Re: [PATCH 01/13] genirq/msi: Add cpumask allocation to alloc_msi_entry

2016-09-20 Thread Alexander Gordeev
On Mon, Sep 19, 2016 at 03:50:07PM +0200, Christoph Hellwig wrote: > On Mon, Sep 19, 2016 at 09:30:58AM +0200, Alexander Gordeev wrote: > > > INIT_LIST_HEAD(>list); > > > desc->dev = dev; > > > + desc->nvec_used = nvec; (*) > > > + if (affi

Re: [PATCH 01/13] genirq/msi: Add cpumask allocation to alloc_msi_entry

2016-09-20 Thread Alexander Gordeev
On Mon, Sep 19, 2016 at 03:50:07PM +0200, Christoph Hellwig wrote: > On Mon, Sep 19, 2016 at 09:30:58AM +0200, Alexander Gordeev wrote: > > > INIT_LIST_HEAD(>list); > > > desc->dev = dev; > > > + desc->nvec_used = nvec; (*) > > > + if (affi

Re: [PATCH RFC 00/21] blk-mq: Introduce combined hardware queues

2016-09-19 Thread Alexander Gordeev
On Fri, Sep 16, 2016 at 05:04:48PM -0400, Keith Busch wrote: CC-ing linux-bl...@vger.kernel.org > I'm not sure I see how this helps. That probably means I'm not considering > the right scenario. Could you elaborate on when having multiple hardware > queues to choose from a given CPU will provide

  1   2   3   4   5   6   7   8   9   10   >