Re: [ANNOUNCE] 5.10.30-rt37

2021-04-20 Thread Ahmed S. Darwish
uot;) and your compilation issue will be fixed. Good luck, -- Ahmed S. Darwish

[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
med S. Darwish (2): net: xfrm: Localize sequence counter per network namespace net: xfrm: Use sequence counter with associated spinlock include/net/netns/xfrm.h | 4 +++- net/xfrm/xfrm_state.c| 11 ++- 2 files changed, 9 insertions(+), 6 deletions(-) base-com

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

2021-02-23 Thread Ahmed S. Darwish
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
29584c25dbacd01ed44a3e45abb35353f1de. > 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
)", 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 choose the co

[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
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 (18): Doc

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

2021-01-18 Thread Ahmed S. Darwish
ntext, 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

[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
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 changed, 65 insert

[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)? > &

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

2021-01-15 Thread Ahmed S. Darwish
ich 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
) 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
emoved (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 here - i

[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
y_ patch 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
d 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 gfp_

[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
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 deletions

[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
)", 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 choose the cor

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

2021-01-12 Thread Ahmed S. Darwish
ntext, 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

[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
ffix, 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
emory 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
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/chelsio/cxgb/cxg

[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
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: Ahmed S. Darwi

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

2020-12-24 Thread Ahmed S. Darwish
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 thr

[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_ev

[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
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 deletions

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

2020-12-18 Thread Ahmed S. Darwish
e 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 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/sc

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

2020-12-18 Thread Ahmed S. Darwish
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 the libsas

[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:

[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
s 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
held. 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
dding > 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

[PATCH v2] scsi: NCR5380: Remove context check

2020-12-04 Thread Ahmed S. Darwish
held. 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 v4 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-11 Thread Ahmed S. Darwish
mail.gmail.com > Reviewed-by: John Hubbard > Reviewed-by: Jan Kara > Signed-off-by: Jason Gunthorpe > --- Thanks for the v3 and v4 updates. For the seqcount_t parts: Acked-by: "Ahmed S. Darwish"

Re: [PATCH v3 0/2] Add a seqcount between gup_fast and copy_page_range()

2020-11-06 Thread Ahmed S. Darwish
hind the diffstat. Konstantin's amazing "b4" tool gets much happier with that ;-) All the best, -- Ahmed S. Darwish Linutronix GmbH

Re: [PATCH v3 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-06 Thread Ahmed S. Darwish
t_retry() as the documentation suggests. (I guess you just missed changing that last one... I'm in process of changing all these "*_seqcount_t_*" stuff to "do_*" as we talked on the v2 thread. Hopefully there will be no more confusion after that.) Kind regards, -- Ahmed S. Darwish Linutronix GmbH

Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-04 Thread Ahmed S. Darwish
ing at the actual use, > it's very non-obvious indeed. > ACK, will do. > Linus Thanks, -- Ahmed S. Darwish Linutronix GmbH

Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-03 Thread Ahmed S. Darwish
On Tue, Nov 03, 2020 at 06:01:30PM -0800, John Hubbard wrote: > On 11/3/20 5:32 PM, Ahmed S. Darwish wrote: ... > > #define __read_seqcount_retry(s, start) > > \ > > - __read_seqcount_t_retry(__seqcount_ptr(s), start) > > +

Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-03 Thread Ahmed S. Darwish
On Tue, Nov 03, 2020 at 09:40:22AM -0800, Linus Torvalds wrote: > On Mon, Nov 2, 2020 at 10:52 PM Ahmed S. Darwish > wrote: > > > > The problem is, I've already documented seqlock.h to death There are > > more comments than code in there, and there is "seqlock

Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-02 Thread Ahmed S. Darwish
On Mon, Nov 02, 2020 at 06:20:45PM -0800, John Hubbard wrote: > On 11/2/20 4:41 PM, Ahmed S. Darwish wrote: > > On Mon, Nov 02, 2020 at 08:25:32PM -0400, Jason Gunthorpe wrote: > > > On Tue, Nov 03, 2020 at 01:17:12AM +0100, Ahmed S. Darwish wrote: > > > > > &

Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-02 Thread Ahmed S. Darwish
On Mon, Nov 02, 2020 at 08:25:32PM -0400, Jason Gunthorpe wrote: > On Tue, Nov 03, 2020 at 01:17:12AM +0100, Ahmed S. Darwish wrote: > > > Please stick with the official exported API: raw_write_seqcount_begin(). > > How did you know this was 'offical exported API' ?? > All

  1   2   3   4   5   6   7   8   9   >