Re: [PATCH] selftests/run_kselftest.sh: Use readlink if realpath is not available

2025-05-06 Thread Yosry Ahmed
On Fri, Mar 28, 2025 at 02:05:43PM -0600, Shuah Khan wrote: > On 3/18/25 10:05, Yosry Ahmed wrote: > > 'realpath' is not always available, fallback to 'readlink -f' if is not > > available. They seem to work equally well in this context. > > Can you add m

Re: [PATCH] selftests/run_kselftest.sh: Use readlink if realpath is not available

2025-03-29 Thread Yosry Ahmed
March 28, 2025 at 10:05 PM, "Shuah Khan" wrote: > > On 3/18/25 10:05, Yosry Ahmed wrote: > > > 'realpath' is not always available, fallback to 'readlink -f' if is not > > available. They seem to work equally well in this context. > &g

[PATCH] selftests/run_kselftest.sh: Use readlink if realpath is not available

2025-03-18 Thread Yosry Ahmed
'realpath' is not always available, fallback to 'readlink -f' if is not available. They seem to work equally well in this context. Signed-off-by: Yosry Ahmed --- tools/testing/selftests/run_kselftest.sh | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff -

Re: [PATCH RFC 3/4] mm/page_alloc_test: Add logic to isolate a node for testing

2025-02-24 Thread Yosry Ahmed
On Mon, Feb 24, 2025 at 02:47:13PM +, Brendan Jackman wrote: > In order to test the page allocator, we need an "instance" of the page > allocator that is not subject to unpredictable perturbation by the live > system. The closest thing that we have to an "instance" of the allocator > is a NUMA

Re: [PATCH RFC 4/4] mm/page_alloc_test: Add smoke-test for page allocation

2025-02-24 Thread Yosry Ahmed
On Mon, Feb 24, 2025 at 02:47:14PM +, Brendan Jackman wrote: > This is the bare minimum to illustrate what KUnit code would look like > that covers the page allocator. > > Even this trivial test illustrates a couple of nice things that are > possible when testing via KUnit > > 1. We can direc

Re: [PATCH RFC 3/4] mm, slab: add static key for should_failslab()

2024-05-31 Thread Yosry Ahmed
On Fri, May 31, 2024 at 9:44 AM Alexei Starovoitov wrote: > > On Fri, May 31, 2024 at 2:33 AM Vlastimil Babka wrote: > > > > Since commit 4f6923fbb352 ("mm: make should_failslab always available for > > fault injection") should_failslab() is unconditionally a noinline > > function. This adds visi

Re: [ANNOUNCE] 5.10.30-rt37

2021-04-20 Thread Ahmed S. Darwish
bc8e0adff343 ("net: xfrm: Use sequence counter with associated spinlock") and your compilation issue will be fixed. Good luck, -- Ahmed S. Darwish

Please respond urgently

2021-04-12 Thread Ahmed Hassan
on how the business will be executed. Best Regards, Ahmed Hassan

Compliments of the Season

2021-04-05 Thread ahmed zengo
Compliments of the Season Greetings from Ahmed Zengo I have something to discuss with you and it is very important and urgent. Please contact me by my email: ahmedzengo1...@gmail.com For further explanation Sincerely Ahmed zengo

Compliments of the Season

2021-03-25 Thread ahmed zengo
Compliments of the Season Greetings from Ahmed Zengo I have something to discuss with you and it is very important and urgent. Please contact me by my email:ahmedzengo1...@gmail.com For further explanation Sincerely Ahmed zengo

[PATCH v1 2/2] net: xfrm: Use sequence counter with associated spinlock

2021-03-16 Thread Ahmed S. Darwish
neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish --- include/net/netns/xfrm.h | 2 +- net/xfrm/xfrm_state.c| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index b59d73d529ba..e816b6a3ef2b

[PATCH v1 1/2] net: xfrm: Localize sequence counter per network namespace

2021-03-16 Thread Ahmed S. Darwish
ta type from seqcount_t to seqcount_LOCKNAME_t in further commits. Fixes: b65e3d7be06f ("xfrm: state: add sequence count to detect hash resizes") Signed-off-by: Ahmed S. Darwish --- include/net/netns/xfrm.h | 4 +++- net/xfrm/xfrm_state.c| 10 +- 2 files changed, 8 insertio

[PATCH v1 0/2] net: xfrm: Use seqcount_spinlock_t

2021-03-16 Thread Ahmed S. Darwish
that the write serialization lock is always held before entering the seqcount write section. If lockdep is disabled, this lock association is compiled out and has neither storage size nor runtime overhead. The first patch is a general mainline fix, and has a Fixes tag. Thanks, 8<-- Ah

Re: [RT v5.11-rt7] WARNING at include/linux/seqlock.h:271 nft_counter_eval

2021-02-23 Thread Ahmed S. Darwish
e OFF. You're on a PREEMPT_RT=y kernel and the sequence counter in question has no lock associated. As Sebastian summarized, the error is just "noisy" at this point. We will of course need to find a (mainline-friendly) way to let the lockdep splat go away for -rt kernels. But for now, it's not harmful. Good luck, -- Ahmed S. Darwish

Re: [ANNOUNCE] v5.11-rc4-rt1

2021-01-21 Thread Ahmed S. Darwish
> d68b29584c25dbacd01ed44a3e45abb35353f1de. > That's sad. Maybe it would be wise to let a bot scan lore regularly, and send an automatic notification to authors whenever their patches reintroduce these macros to non-core kernel code. Thanks, -- Ahmed S. Darwish

[PATCH v3 05/19] scsi: isci: port: link down: Pass gfp_t flags

2021-01-18 Thread Ahmed S. Darwish
ot;(+)", is a PCI ->remove() and PM_OPS ->suspend() cold path. Thus, pass GFP_ATOMIC to the libsas phy event notifier. Note, The now-replaced libsas APIs used in_interrupt() to implicitly decide which memory allocation type to use. This was only partially correct, as it fails to cho

[PATCH v3 03/19] scsi: libsas: Introduce a _gfp() variant of event notifiers

2021-01-18 Thread Ahmed S. Darwish
e modified first to pass GFP context, then the non _gfp() libsas API variants will be modified to take a gfp_t by default. Fixes: 1c393b970e0f ("scsi: libsas: Use dynamic alloced work to avoid sas event lost") Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jason Yan

[PATCH v3 00/19] scsi: libsas: Remove in_interrupt() check

2021-01-18 Thread Ahmed S. Darwish
ransformed so that callers explicitly pass the gfp_t memory allocation flags. Affected libsas clients are modified accordingly. Patches #1, #2 => #7 have "Fixes: " tags and address bugs the were noticed during the context analysis. Thanks! 8<-- Ahmed S. Darwish (

[PATCH v3 04/19] scsi: mvsas: Pass gfp_t flags to libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
ext, but it calls all the libsas event notifier APIs under a spin_lock_irqsave(). Pass GFP_ATOMIC. Fixes: 1c393b970e0f ("scsi: libsas: Use dynamic alloced work to avoid sas event lost") Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jason Yan --- drivers/scsi/mvsas/mv_sas.c |

[PATCH v3 01/19] Documentation: scsi: libsas: Remove notify_ha_event()

2021-01-18 Thread Ahmed S. Darwish
The ->notify_ha_event() hook has long been removed from the libsas event interface. Remove it from documentation. Fixes: 042ebd293b86 ("scsi: libsas: kill useless ha_event and do some cleanup") Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: sta...@vg

[PATCH v3 02/19] scsi: libsas and users: Remove notifier indirection

2021-01-18 Thread Ahmed S. Darwish
pointer usage, which is generally a good thing. Downside is that there are 2x more symbol exports. [a.darw...@linutronix.de: Remove the now unused "sas_ha" local variables] Signed-off-by: John Garry Reviewed-by: Christoph Hellwig Signed-off-by: Ahmed S. Darwish --- Documentation/scsi/

[PATCH v3 06/19] scsi: isci: port: link up: Pass gfp_t flags

2021-01-18 Thread Ahmed S. Darwish
y correct, as it fails to choose the correct GFP flags when just preemption or interrupts are disabled. Such buggy code paths are marked with "(@)" in the call chains above. Fixes: 1c393b970e0f ("scsi: libsas: Use dynamic alloced work to avoid sas event lost") Signed-off-by: Ahmed

[PATCH v3 14/19] scsi: aic94xx: Switch back to original libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry --- drivers/scsi/aic94xx/aic94xx_scb.c | 29

[PATCH v3 08/19] scsi: libsas: Pass gfp_t flags to event notifiers

2021-01-18 Thread Ahmed S. Darwish
Use the new libsas event notifiers API, which requires callers to explicitly pass the gfp_t memory allocation flags. Context analysis: - sas_enable_revalidation(): process, acquires mutex - sas_resume_ha(): process, calls wait_event_timeout() Signed-off-by: Ahmed S. Darwish Reviewed-by

[PATCH v3 16/19] scsi: libsas: Switch back to original event notifiers API

2021-01-18 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original event notifiers API, while still passing GFP context. The _gfp() notifier variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jason Yan --- drivers/scsi

[PATCH v3 07/19] scsi: isci: port: broadcast change: Pass gfp_t flags

2021-01-18 Thread Ahmed S. Darwish
o implicitly decide which memory allocation type to use. This was only partially correct, as it fails to choose the correct GFP flags when just preemption or interrupts are disabled. Such buggy code paths are marked with "(@)" in the call chains above. Fixes: 1c393b970e0f ("scsi: libsas:

[PATCH v3 10/19] scsi: aic94xx: Pass gfp_t flags to libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
asklet() -> aic94xx_scb.c: asd_bytes_dmaed_tasklet() -> aic94xx_scb.c: asd_link_reset_err_tasklet() -> aic94xx_scb.c: asd_primitive_rcvd_tasklet() All functions are invoked by escb_tasklet_complete(), which is invoked by the tasklet handler. Pass GFP_ATOMIC. Signed-off-by: A

[PATCH v3 12/19] scsi: libsas: event notifiers API: Add gfp_t flags parameter

2021-01-18 Thread Ahmed S. Darwish
again to use the original libsas APIs (while passing gfp_t). The temporary _gfp()-suffixed versions can then be removed. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jason Yan --- Documentation/scsi/libsas.rst | 4 +- drivers/scsi/libsas/sas_event.c| 62

[PATCH v3 09/19] scsi: pm80xx: Pass gfp_t flags to libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
p(). Pass GFP_KERNEL. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jack Wang --- drivers/scsi/pm8001/pm8001_hwi.c | 54 +--- drivers/scsi/pm8001/pm8001_sas.c | 8 ++--- drivers/scsi/pm8001/pm80xx_hwi.c | 41 +++- 3 files chang

[PATCH v3 15/19] scsi: pm80xx: Switch back to original libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jack Wang --- drivers/scsi/pm8001

[PATCH v3 11/19] scsi: hisi_sas: Pass gfp_t flags to libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
nd phy_bcast_v3_hw(): Both are invoked exclusively from irq handlers. Pass GFP_ATOMIC. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 3 ++- drivers/scsi/hisi_sas/hisi_sas_main.c | 26 +++--- drivers/scsi/hisi_sas/hisi_sas_v1_

Re: [RFC PATCH 0/1] net: arcnet: Fix RESET sequence

2021-01-18 Thread Ahmed S. Darwish
On Mon, Jan 11, 2021 at 02:54:06PM +0100, Ahmed S. Darwish wrote: > Hi, > > On Tue, Dec 22, 2020 at 10:03:37AM +0100, Ahmed S. Darwish wrote: > ... > > > > Included is an RFC patch to fix the points above: if the RESET flag is > > encountered, a workqueue is sche

[PATCH v3 19/19] scsi: libsas: Remove temporarily-added _gfp() API variants

2021-01-18 Thread Ahmed S. Darwish
These variants were added for bisectability. Remove them, as all call sites have now been convertd to use the original API. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Jason Yan --- Documentation/scsi/libsas.rst | 2 -- drivers/scsi/libsas/sas_event.c| 14

[PATCH v3 18/19] scsi: mvsas: Switch back to original libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry --- drivers/scsi/mvsas/mv_sas.c | 8

[PATCH v3 17/19] scsi: isci: Switch back to original libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: Artur Paszkiewicz --- drivers/scsi/isci

[PATCH v3 13/19] scsi: hisi_sas: Switch back to original libsas event notifiers

2021-01-18 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 9

Re: [PATCH v2 00/19] scsi: libsas: Remove in_interrupt() check

2021-01-15 Thread Ahmed S. Darwish
On Fri, Jan 15, 2021 at 04:29:51PM +, John Garry wrote: > On 15/01/2021 16:27, Ahmed S. Darwish wrote: > > Thanks! > > > > Shall I add you r-b tag to the whole series then, or only to the ones > > which directly touch libsas (#3, #12, #16, and #19)? > > The who

Re: [PATCH v2 00/19] scsi: libsas: Remove in_interrupt() check

2021-01-15 Thread Ahmed S. Darwish
es which directly touch libsas (#3, #12, #16, and #19)? > > As an aside, your analysis showed some quite poor usage of spinlocks in some > drivers, specifically grabbing a lock and then calling into a depth of 3 or > 4 functions. > Correct. Kind regards, -- Ahmed S. Darwish

Re: [PATCH v2 00/19] scsi: libsas: Remove in_interrupt() check

2021-01-12 Thread Ahmed S. Darwish
_event_timeout() two or three lines nearby, and so on. All the other libsas clients (that is, except isci) also had normal call chains that were IMHO easy to follow. Thanks, -- Ahmed S. Darwish Linutronix GmbH

Re: [PATCH v2 04/19] scsi: mvsas: Pass gfp_t flags to libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
uffix is removed (patches #13 => #19), the lines get within the 80 cols range. Thanks, -- Ahmed S. Darwish Linutronix GmbH

Re: [PATCH v2 00/19] scsi: libsas: Remove in_interrupt() check

2021-01-12 Thread Ahmed S. Darwish
On Tue, Jan 12, 2021 at 11:53:50AM +, John Garry wrote: > On 12/01/2021 11:06, Ahmed S. Darwish wrote: > > Hi, > > > > Changelog v2 > > ... > > I'll give this a spin today and help review also then. > > There's 18 patches her

[PATCH v3 02/19] scsi: libsas and users: Remove notifier indirection

2021-01-12 Thread Ahmed S. Darwish
pointer usage, which is generally a good thing. Downside is that there are 2x more symbol exports. [a.darw...@linutronix.de: Remove the now unused "sas_ha" local variables] Signed-off-by: John Garry Signed-off-by: Ahmed S. Darwish --- Documentation/scsi/libsas.rst | 8 ++ dr

Re: [PATCH v2 02/19] scsi: libsas and users: Remove notifier indirection

2021-01-12 Thread Ahmed S. Darwish
On Tue, Jan 12, 2021 at 11:36:21AM +, John Garry wrote: > On 12/01/2021 11:06, Ahmed S. Darwish wrote: > > From: John Garry > > > > The LLDDs report events to libsas with .notify_port_event and > > .notify_phy_event callbacks. > > > > These callbacks are

Re: [PATCH] MAINTAINERS: Remove intel-linux-...@intel.com for INTEL C600 SAS DRIVER

2021-01-12 Thread Ahmed S. Darwish
On Tue, Jan 12, 2021 at 07:11:30PM +0800, John Garry wrote: > The mail address intel-linux-...@intel.com bounces for Ahmed and I, so > just remove it. > > Cc: Ahmed S. Darwish > Cc: Artur Paszkiewicz > Signed-off-by: John Garry > Acked-by: Ahmed S. Darwish

Re: [PATCH] scsi: libsas and users: Remove notifier indirection

2021-01-12 Thread Ahmed S. Darwish
ch in my series, I've included it at the top of my v2 submission and rebased everything on top: https://lkml.kernel.org/r/20210112110647.627783-1-a.darw...@linutronix.de Some left-over 'sas_ha' local variables were removed, and I've mentioned that in the commit log of course. Thanks! -- Ahmed S. Darwish Linutronix GmbH

[PATCH v2 18/19] scsi: mvsas: Switch back to original libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish --- drivers/scsi/mvsas/mv_sas.c | 8 1 file changed, 4

[PATCH v2 19/19] scsi: libsas: Remove temporarily-added _gfp() API variants

2021-01-12 Thread Ahmed S. Darwish
These variants were added for bisectability. Remove them, as all call sites have now been convertd to use the original API. Signed-off-by: Ahmed S. Darwish --- Documentation/scsi/libsas.rst | 2 -- drivers/scsi/libsas/sas_event.c| 14 -- drivers/scsi/libsas/sas_init.c

[PATCH v2 16/19] scsi: libsas: Switch back to original event notifiers API

2021-01-12 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original event notifiers API, while still passing GFP context. The _gfp() notifier variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Cc: John Garry Cc: Jason Yan --- drivers/scsi/libsas

[PATCH v2 14/19] scsi: aic94xx: Switch back to original libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish --- drivers/scsi/aic94xx/aic94xx_scb.c | 18 +- 1 file

[PATCH v2 11/19] scsi: hisi_sas: Pass gfp_t flags to libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
nd phy_bcast_v3_hw(): Both are invoked exclusively from irq handlers. Pass GFP_ATOMIC. Signed-off-by: Ahmed S. Darwish Cc: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 3 ++- drivers/scsi/hisi_sas/hisi_sas_main.c | 25 ++--- drivers/scsi/hisi_sas/hisi_sas_v1

[PATCH v2 07/19] scsi: isci: port: broadcast change: Pass gfp_t flags

2021-01-12 Thread Ahmed S. Darwish
o implicitly decide which memory allocation type to use. This was only partially correct, as it fails to choose the correct GFP flags when just preemption or interrupts are disabled. Such buggy code paths are marked with "(@)" in the call chains above. Fixes: 1c393b970e0f ("scsi: libs

[PATCH v2 17/19] scsi: isci: Switch back to original libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Cc: Artur Paszkiewicz --- drivers/scsi/isci/port.c | 12

[PATCH v2 12/19] scsi: libsas: event notifiers API: Add gfp_t flags parameter

2021-01-12 Thread Ahmed S. Darwish
again to use the original libsas APIs (while passing gfp_t). The temporary _gfp()-suffixed versions can then be removed. Signed-off-by: Ahmed S. Darwish Cc: John Garry Cc: Jason Yan --- Documentation/scsi/libsas.rst | 4 +- drivers/scsi/libsas/sas_event.c| 61

[PATCH v2 15/19] scsi: pm80xx: Switch back to original libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Cc: Jack Wang --- drivers/scsi/pm8001/pm8001_hwi.c | 38

[PATCH v2 13/19] scsi: hisi_sas: Switch back to original libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
libsas notifiers were then modified to accept gfp_t flags by default. Switch back to the original libas API, while still passing GFP context. The libsas _gfp() variants will be removed afterwards. Signed-off-by: Ahmed S. Darwish Cc: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 8

[PATCH v2 00/19] scsi: libsas: Remove in_interrupt() check

2021-01-12 Thread Ahmed S. Darwish
oticed during the context analysis. Thanks! 8<-- Ahmed S. Darwish (18): Documentation: scsi: libsas: Remove notify_ha_event() scsi: libsas: Introduce a _gfp() variant of event notifiers scsi: mvsas: Pass gfp_t flags to libsas event notifiers scsi: isci: port: link down: Pass

[PATCH v2 10/19] scsi: aic94xx: Pass gfp_t flags to libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
asklet() -> aic94xx_scb.c: asd_bytes_dmaed_tasklet() -> aic94xx_scb.c: asd_link_reset_err_tasklet() -> aic94xx_scb.c: asd_primitive_rcvd_tasklet() All functions are invoked by escb_tasklet_complete(), which is invoked by the tasklet handler. Pass GFP_ATOMIC. Signed-off-by: A

[PATCH v2 08/19] scsi: libsas: Pass gfp_t flags to event notifiers

2021-01-12 Thread Ahmed S. Darwish
Use the new libsas event notifiers API, which requires callers to explicitly pass the gfp_t memory allocation flags. Context analysis: - sas_enable_revalidation(): process, acquires mutex - sas_resume_ha(): process, calls wait_event_timeout() Signed-off-by: Ahmed S. Darwish Cc: John Garry

[PATCH v2 09/19] scsi: pm80xx: Pass gfp_t flags to libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
p(). Pass GFP_KERNEL. Signed-off-by: Ahmed S. Darwish Cc: Jack Wang --- drivers/scsi/pm8001/pm8001_hwi.c | 38 drivers/scsi/pm8001/pm8001_sas.c | 9 drivers/scsi/pm8001/pm80xx_hwi.c | 30 - 3 files changed, 38 insertions(+), 39

[PATCH v2 06/19] scsi: isci: port: link up: Pass gfp_t flags

2021-01-12 Thread Ahmed S. Darwish
y correct, as it fails to choose the correct GFP flags when just preemption or interrupts are disabled. Such buggy code paths are marked with "(@)" in the call chains above. Fixes: 1c393b970e0f ("scsi: libsas: Use dynamic alloced work to avoid sas event lost") Signed-off-by: Ahmed

[PATCH v2 05/19] scsi: isci: port: link down: Pass gfp_t flags

2021-01-12 Thread Ahmed S. Darwish
ot;(+)", is a PCI ->remove() and PM_OPS ->suspend() cold path. Thus, pass GFP_ATOMIC to the libsas phy event notifier. Note, The now-replaced libsas APIs used in_interrupt() to implicitly decide which memory allocation type to use. This was only partially correct, as it fails to choo

[PATCH v2 04/19] scsi: mvsas: Pass gfp_t flags to libsas event notifiers

2021-01-12 Thread Ahmed S. Darwish
ext, but it calls all the libsas event notifier APIs under a spin_lock_irqsave(). Pass GFP_ATOMIC. Fixes: 1c393b970e0f ("scsi: libsas: Use dynamic alloced work to avoid sas event lost") Signed-off-by: Ahmed S. Darwish Cc: John Garry Cc: Jason Yan --- drivers/scsi/mvsas/mv_sas.c | 18 +

[PATCH v2 03/19] scsi: libsas: Introduce a _gfp() variant of event notifiers

2021-01-12 Thread Ahmed S. Darwish
e modified first to pass GFP context, then the non _gfp() libsas API variants will be modified to take a gfp_t by default. Fixes: 1c393b970e0f ("scsi: libsas: Use dynamic alloced work to avoid sas event lost") Signed-off-by: Ahmed S. Darwish Cc: John Garry Cc: Jason Yan --- Docum

[PATCH v2 02/19] scsi: libsas and users: Remove notifier indirection

2021-01-12 Thread Ahmed S. Darwish
From: John Garry The LLDDs report events to libsas with .notify_port_event and .notify_phy_event callbacks. These callbacks are fixed and so there is no reason why we cannot call the functions directly, so do that. This neatens the code slightly. [a.darw...@linutronix.de: Remove the now unused

[PATCH v2 01/19] Documentation: scsi: libsas: Remove notify_ha_event()

2021-01-12 Thread Ahmed S. Darwish
The ->notify_ha_event() hook has long been removed from the libsas event interface. Remove it from documentation. Fixes: 042ebd293b86 ("scsi: libsas: kill useless ha_event and do some cleanup") Signed-off-by: Ahmed S. Darwish Reviewed-by: John Garry Cc: sta...@vg

Re: [PATCH] scsi: libsas and users: Remove notifier indirection

2021-01-11 Thread Ahmed S. Darwish
On Mon, Jan 11, 2021 at 05:44:17PM +, John Garry wrote: > On 11/01/2021 17:41, Ahmed S. Darwish wrote: > > On Tue, Jan 12, 2021 at 01:28:32AM +0800, John Garry wrote: > > ... > > > index a920eced92ec..6a51abdc59ae 100644 > > > --- a/drivers/scsi/mvsas/mv_sas

Re: [PATCH] scsi: libsas and users: Remove notifier indirection

2021-01-11 Thread Ahmed S. Darwish
On Tue, Jan 12, 2021 at 01:28:32AM +0800, John Garry wrote: ... > index a920eced92ec..6a51abdc59ae 100644 > --- a/drivers/scsi/mvsas/mv_sas.c > +++ b/drivers/scsi/mvsas/mv_sas.c > @@ -230,7 +230,7 @@ static void mvs_bytes_dmaed(struct mvs_info *mvi, int i) > } > > sas_ha = mvi->sas; > -

Re: [PATCH 00/11] scsi: libsas: Remove in_interrupt() check

2021-01-11 Thread Ahmed S. Darwish
g the _gfp() suffix, per your request earlier: https://lkml.kernel.org/r/68957d37-c789-0f0e-f5d1-85fef7f39...@huawei.com Thanks! -- Ahmed S. Darwish Linutronix GmbH

Re: [RFC PATCH 0/1] net: arcnet: Fix RESET sequence

2021-01-11 Thread Ahmed S. Darwish
Hi, On Tue, Dec 22, 2020 at 10:03:37AM +0100, Ahmed S. Darwish wrote: ... > > Included is an RFC patch to fix the points above: if the RESET flag is > encountered, a workqueue is scheduled to run the generic reset sequence. > ... Kind reminder.

Re: [PATCH 00/11] scsi: libsas: Remove in_interrupt() check

2021-01-11 Thread Ahmed S. Darwish
Pre-allocated memory is an option.(Which we have tried at the very > > beginnig by Wang Yijing.) > > Right, I remember this, but I think the concern was having a proper method > to manage this pre-allocated memory then. And same problem now. > > > > > Or directly use GFP_ATOMIC is maybe better than passing flags from lldds. > > > > I think that if we don't really need this, then should not use it. > Kind reminder. Do we have any consensus here? Thanks, -- Ahmed S. Darwish Linutronix GmbH

Re: [RFC PATCH 1/3] chelsio: cxgb: Remove ndo_poll_controller()

2020-12-24 Thread Ahmed S. Darwish
[[ Actually adding Eric to Cc ]] On Thu, Dec 24, 2020 at 02:11:46PM +0100, Ahmed S. Darwish wrote: > Since commit ac3d9dd034e5 ("netpoll: make ndo_poll_controller() > optional"), networking drivers which use NAPI for clearing their TX > completions should not provide an

[RFC PATCH 3/3] chelsio: cxgb: Do not schedule a workqueue for external interrupts

2020-12-24 Thread Ahmed S. Darwish
er. Remove all the workqueue code that is now no longer needed, including the spinlock used for synchronizing the workqueue's NIC regsiters access against the irq handler. Signed-off-by: Ahmed S. Darwish --- drivers/net/ethernet/chelsio/cxgb/common.h | 2 -- drivers/net/ethernet/chelsi

[RFC PATCH 2/3] chelsio: cxgb: Move slow interrupt handling to threaded irqs

2020-12-24 Thread Ahmed S. Darwish
) on a timer it has already interrupted, it will loop forever. Move the slow t1 interrupt handling path, t1_slow_intr_handler(), to a threaded-irq task context. Signed-off-by: Ahmed S. Darwish --- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 6 +++--- drivers/net/ethernet/chelsio/cxgb/sge.c | 13

[RFC PATCH 1/3] chelsio: cxgb: Remove ndo_poll_controller()

2020-12-24 Thread Ahmed S. Darwish
ndo_poll_controller(). Link: https://lkml.kernel.org/r/20180921222752.101307-1-eduma...@google.com Link: https://lkml.kernel.org/r/a782704a-df97-4e85-b10a-d2268a67d...@fb.com References: 822d54b9c2c1 ("netpoll: Drop budget parameter from NAPI polling call hierarchy") Signed-off-by: Ahme

[RFC PATCH 0/3] chelsio: cxgb: Use threaded irqs

2020-12-24 Thread Ahmed S. Darwish
vings across the driver, as some workqueues and spinlocks are no longer needed. Note: Only compile-tested. I do not have the hardware in question. Thanks, 8<-- Ahmed S. Darwish (3): chelsio: cxgb: Remove ndo_poll_controller() chelsio: cxgb: Move slow interrupt handling to th

[RFC PATCH 0/1] net: arcnet: Fix RESET sequence

2020-12-22 Thread Ahmed S. Darwish
k drivers/net/arcnet/com20020.c. Included is an RFC patch to fix the points above: if the RESET flag is encountered, a workqueue is scheduled to run the generic reset sequence. Note: Only compile-tested, as I do not have the hardware in question. Thanks, 8<-- Ahmed S. Darwish (1): net:

[RFC PATCH 1/1] net: arcnet: Fix RESET flag handling

2020-12-22 Thread Ahmed S. Darwish
heck drivers/net/arcnet/com20020.c. Run the device RESET sequence from a scheduled workqueue instead. Signed-off-by: Ahmed S. Darwish --- drivers/net/arcnet/arc-rimi.c | 4 +- drivers/net/arcnet/arcdevice.h| 6 +++ drivers/net/arcnet/arcnet.c | 69

Re: [PATCH 11/11] scsi: libsas: event notifiers: Remove non _gfp() variants

2020-12-21 Thread Ahmed S. Darwish
On Mon, Dec 21, 2020 at 05:17:13PM +, John Garry wrote: > On 18/12/2020 20:43, Ahmed S. Darwish wrote: > > All call-sites of below libsas APIs: > > > >- sas_alloc_event() > >- sas_ha_struct::notify_port_event() > >- sas_ha_struct::notify_phy_event

[PATCH 09/11] scsi: aic94xx: Pass gfp_t flags to libsas event notifiers

2020-12-18 Thread Ahmed S. Darwish
asklet() -> aic94xx_scb.c: asd_bytes_dmaed_tasklet() -> aic94xx_scb.c: asd_link_reset_err_tasklet() -> aic94xx_scb.c: asd_primitive_rcvd_tasklet() All functions are invoked by escb_tasklet_complete(), which is invoked by the tasklet handler. Pass GFP_ATOMIC. Signed-off-by: A

[PATCH 08/11] scsi: pm80xx: Pass gfp_t flags to libsas event notifiers

2020-12-18 Thread Ahmed S. Darwish
p(). Pass GFP_KERNEL. Signed-off-by: Ahmed S. Darwish Cc: Jack Wang --- drivers/scsi/pm8001/pm8001_hwi.c | 38 drivers/scsi/pm8001/pm8001_sas.c | 8 +++ drivers/scsi/pm8001/pm80xx_hwi.c | 30 - 3 files changed, 38 insertions(+), 38

[PATCH 06/11] scsi: isci: port: broadcast change: Pass gfp_t flags

2020-12-18 Thread Ahmed S. Darwish
n from the "(*)" markers above, almost all the call-chains are atomic. The only exception, marked with "(+)", is a PCI ->remove() and PM_OPS ->suspend() cold path. Thus, pass GFP_ATOMIC to the libsas port event notifier. Note, the now-replaced libsas APIs used in_int

[PATCH 11/11] scsi: libsas: event notifiers: Remove non _gfp() variants

2020-12-18 Thread Ahmed S. Darwish
All call-sites of below libsas APIs: - sas_alloc_event() - sas_ha_struct::notify_port_event() - sas_ha_struct::notify_phy_event() have been converted to use the new _gfp()-suffixed version. Remove the old APIs from libsas code, headers, and documentation. Signed-off-by: Ahmed S. Darwish

[PATCH 10/11] scsi: hisi_sas: Pass gfp_t flags to libsas event notifiers

2020-12-18 Thread Ahmed S. Darwish
nd phy_bcast_v3_hw(): Both are invoked exclusively from irq handlers. Pass GFP_ATOMIC. Signed-off-by: Ahmed S. Darwish Cc: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 3 ++- drivers/scsi/hisi_sas/hisi_sas_main.c | 26 +++--- drivers/scsi/hisi_sas/hisi_sas_v1

[PATCH 07/11] scsi: libsas: Pass gfp_t flags to event notifiers

2020-12-18 Thread Ahmed S. Darwish
Use the new libsas event notifiers API, which requires callers to explicitly pass the gfp_t memory allocation flags. Context analysis: - sas_enable_revalidation(): process, acquires mutex - sas_resume_ha(): process, calls wait_event_timeout() Signed-off-by: Ahmed S. Darwish Cc: John Garry

[PATCH 05/11] scsi: isci: port: link up: Pass gfp_t flags

2020-12-18 Thread Ahmed S. Darwish
y partially correct, as it fails to choose the correct GFP flags when just preemption or interrupts are disabled. Such buggy code paths are marked with "(@)" in the call chains above. Signed-off-by: Ahmed S. Darwish Cc: sta...@vger.kernel.org Cc: Artur Paszkiewicz --- drivers/scsi/isc

[PATCH 04/11] scsi: isci: port: link down: Pass gfp_t flags

2020-12-18 Thread Ahmed S. Darwish
ing_state_enter() -> sci_change_state(SCI_PHY_STARTING) As can be seen from the "(*)" markers above, almost all the call-chains are atomic. The only exception, marked with "(+)", is a PCI ->remove() and PM_OPS ->suspend() cold path. Thus, pass GFP_ATOMIC to t

[PATCH 02/11] scsi: libsas: Introduce a _gfp() variant of event notifiers

2020-12-18 Thread Ahmed S. Darwish
h all behave like the non _gfp() variants but use a caller passed GFP mask for allocations. After all callers are converted to pass the GFP context, the non _gfp() variants will be removed. Signed-off-by: Ahmed S. Darwish Cc: sta...@vger.kernel.org Cc: John Garry Cc: Jason Yan --- Documenta

[PATCH 03/11] scsi: mvsas: Pass gfp_t flags to libsas event notifiers

2020-12-18 Thread Ahmed S. Darwish
tes_dmaed(..., GFP_ATOMIC); => mvs_work_queue(): Invoked from process context, but it calls all the libsas event notifier APIs under a spin_lock_irqsave(). Pass GFP_ATOMIC. Signed-off-by: Ahmed S. Darwish Cc: sta...@vger.kernel.org Cc: John Garry Cc: Jason Yan --- drivers/scsi/mvsas/mv_sas.c

[PATCH 01/11] Documentation: scsi: libsas: Remove notify_ha_event()

2020-12-18 Thread Ahmed S. Darwish
The ->notify_ha_event() hook has long been removed from the libsas event interface. Remove it from documentation. Fixes: 042ebd293b86 ("scsi: libsas: kill useless ha_event and do some cleanup") Signed-off-by: Ahmed S. Darwish Cc: sta...@vger.kernel.org Cc: John Garry

[PATCH 00/11] scsi: libsas: Remove in_interrupt() check

2020-12-18 Thread Ahmed S. Darwish
rst six patches have "Fixes: " tags and address bugs the were noticed during the context analysis. Thanks! 8<-- Ahmed S. Darwish (11): Documentation: scsi: libsas: Remove notify_ha_event() scsi: libsas: Introduce a _gfp() variant of event notifiers scsi: mvsas: Pas

[tip: locking/core] seqlock: kernel-doc: Specify when preemption is automatically altered

2020-12-09 Thread tip-bot2 for Ahmed S. Darwish
The following commit has been merged into the locking/core branch of tip: Commit-ID: cb262935a166bdef0ccfe6e2adffa00c0f2d038a Gitweb: https://git.kernel.org/tip/cb262935a166bdef0ccfe6e2adffa00c0f2d038a Author:Ahmed S. Darwish AuthorDate:Sun, 06 Dec 2020 17:21:43 +01:00

[tip: locking/core] seqlock: Prefix internal seqcount_t-only macros with a "do_"

2020-12-09 Thread tip-bot2 for Ahmed S. Darwish
The following commit has been merged into the locking/core branch of tip: Commit-ID: 66bcfcdf89d00f2409f4b5da0f8c20c08318dc72 Gitweb: https://git.kernel.org/tip/66bcfcdf89d00f2409f4b5da0f8c20c08318dc72 Author:Ahmed S. Darwish AuthorDate:Sun, 06 Dec 2020 17:21:42 +01:00

[tip: locking/core] Documentation: seqlock: s/LOCKTYPE/LOCKNAME/g

2020-12-09 Thread tip-bot2 for Ahmed S. Darwish
The following commit has been merged into the locking/core branch of tip: Commit-ID: cf48647243cc28d15280600292db5777592606c5 Gitweb: https://git.kernel.org/tip/cf48647243cc28d15280600292db5777592606c5 Author:Ahmed S. Darwish AuthorDate:Sun, 06 Dec 2020 17:21:41 +01:00

Re: [PATCH -tip v1 3/3] seqlock: kernel-doc: Specify when preemption is automatically altered

2020-12-08 Thread Ahmed S. Darwish
(which you did, thanks): /* * Disabling preemption is not needed for the write side, as * the read side does not spin, but goes to mmap_lock. * ... */ And IMHO, that should be enough. Developers of such special cases are already assumed to know what they're doing. Thanks a lot, -- Ahmed S. Darwish Linutronix GmbH

[PATCH -tip v1 1/3] Documentation: seqlock: s/LOCKTYPE/LOCKNAME/g

2020-12-06 Thread Ahmed S. Darwish
rdize naming convention") Signed-off-by: Ahmed S. Darwish Cc: sta...@vger.kernel.org Cc: Jonathan Corbet --- Documentation/locking/seqlock.rst | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Documentation/locking/seqlock.rst b/Documentation/locking/s

[PATCH -tip v1 2/3] seqlock: Prefix internal seqcount_t-only macros with a "do_"

2020-12-06 Thread Ahmed S. Darwish
prefixing a "do_". Link: https://lkml.kernel.org/r/CAHk-=wgb8nyoqufpn0o6a5bpjcjpnxvh+krxapujhsgg+7q...@mail.gmail.com Link: https://lkml.kernel.org/r/CAHk-=wikhgexmprxgaw+mvxg1zsgpztbbvwob23vetk41et...@mail.gmail.com Signed-off-by: Ahmed S. Darwish --- include/

[PATCH -tip v1 3/3] seqlock: kernel-doc: Specify when preemption is automatically altered

2020-12-06 Thread Ahmed S. Darwish
: https://lkml.kernel.org/r/CAHk-=wikhgexmprxgaw+mvxg1zsgpztbbvwob23vetk41et...@mail.gmail.com Signed-off-by: Ahmed S. Darwish Cc: Jonathan Corbet --- include/linux/seqlock.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/linux/seqlock.h b/include

[PATCH -tip v1 0/3] seqlock: assorted cleanups

2020-12-06 Thread Ahmed S. Darwish
//lkml.kernel.org/r/CAHk-=wikhgexmprxgaw+mvxg1zsgpztbbvwob23vetk41et...@mail.gmail.com 8<-- Ahmed S. Darwish (3): Documentation: seqlock: s/LOCKTYPE/LOCKNAME/g seqlock: Prefix internal seqcount_t-only macros with a "do_" seqlock: kernel-doc: Specify when preemption is auto

[PATCH v3] scsi: NCR5380: Remove context check

2020-12-05 Thread Ahmed S. Darwish
Since NCR5380_poll_politely2() already takes a "wait" argument in jiffies, use it to determine if the function can sleep. Modify atomic callers, which passed an unused wait value in terms of HZ, to pass zero. Suggested-by: Finn Thain Co-developed-by: Sebastian

Re: [PATCH] scsi/NCR5380: Remove in_interrupt() test

2020-12-04 Thread Ahmed S. Darwish
by adding > a new can_sleep parameter to do_abort() and NCR5380_transfer_pio(), as in, ... > > Does that sound like a reasonable compromise? > Yes, of course. Thanks a lot. I've sent a v2. -- Ahmed S. Darwish Linutronix GmbH

  1   2   3   4   5   6   7   8   9   10   >