linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: "Ahmed S. Darwish" <a.darwish@linutronix.de>,
	Jason Yan <yanaijie@huawei.com>
Cc: Hannes Reinecke <hare@suse.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Daniel Wagner <dwagner@suse.de>,
	Artur Paszkiewicz <artur.paszkiewicz@intel.com>,
	Jack Wang <jinpu.wang@cloud.ionos.com>,
	<linux-scsi@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Sebastian A. Siewior" <bigeasy@linutronix.de>
Subject: Re: [PATCH 00/11] scsi: libsas: Remove in_interrupt() check
Date: Mon, 11 Jan 2021 13:59:25 +0000	[thread overview]
Message-ID: <ccddbd5e-ec63-934e-c15a-7263aeaa24ce@huawei.com> (raw)
In-Reply-To: <X/xV/uR77a9JLZ4v@lx-t490>

On 11/01/2021 13:43, Ahmed S. Darwish wrote:
> Hi John, Jason,
> 
> On Tue, Dec 22, 2020 at 12:54:58PM +0000, John Garry wrote:
>> On 22/12/2020 12:30, Jason Yan wrote:
>>>>       return event;
>>>>
>>>>
>>>> So default for phy->ha->event_thres is 32, and I can't imagine that
>>> The default value is 1024.
>> Ah, 32 is the minimum allowed set via sysfs.
>>
>>>> anyone has ever reconfigured this via sysfs or even required a value
>>>> that large. Maybe Jason (cc'ed) knows better. It's an arbitrary
>>>> value to say that the PHY is malfunctioning. I do note that there is
>>>> the circular path sas_alloc_event() -> sas_notify_phy_event() ->
>>>> sas_alloc_event() there also.
>>>>
>>>> Anyway, if the 32x event memories were per-allocated, maybe there is
>>>> a clean method to manage this memory, which even works in atomic
>>>> context, so we could avoid this rework (ignoring the context bugs
>>>> you reported for a moment). I do also note that the sas_event_cache
>>>> size is not huge.
>>>>
>>> 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?
> 

Hi Ahmed,

To me, what you're doing seems fine.

I was looking for some API to manage small memory pools and which is 
atomic safe to avoid passing the context flag, but I didn't find such a 
thing.

Just one other thing to mention:
I have a patch to remove the indirection in libsas notifiers:
https://github.com/hisilicon/kernel-dev/commit/87fcd7e113dc05b7933260e7fa4588dc3730cc2a

I was going to send it today. Hopefully, if community has no problem 
with it, you can make your changes with that in mind.

Thanks,
John




  reply	other threads:[~2021-01-11 14:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 20:43 [PATCH 00/11] scsi: libsas: Remove in_interrupt() check Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 01/11] Documentation: scsi: libsas: Remove notify_ha_event() Ahmed S. Darwish
2020-12-21  9:10   ` John Garry
2020-12-18 20:43 ` [PATCH 02/11] scsi: libsas: Introduce a _gfp() variant of event notifiers Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 03/11] scsi: mvsas: Pass gfp_t flags to libsas " Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 04/11] scsi: isci: port: link down: Pass gfp_t flags Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 05/11] scsi: isci: port: link up: " Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 06/11] scsi: isci: port: broadcast change: " Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 07/11] scsi: libsas: Pass gfp_t flags to event notifiers Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 08/11] scsi: pm80xx: Pass gfp_t flags to libsas " Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 09/11] scsi: aic94xx: " Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 10/11] scsi: hisi_sas: " Ahmed S. Darwish
2020-12-18 20:43 ` [PATCH 11/11] scsi: libsas: event notifiers: Remove non _gfp() variants Ahmed S. Darwish
2020-12-21 17:17   ` John Garry
2020-12-21 17:38     ` Ahmed S. Darwish
2020-12-21 10:13 ` [PATCH 00/11] scsi: libsas: Remove in_interrupt() check John Garry
2020-12-22 12:30   ` Jason Yan
2020-12-22 12:54     ` John Garry
2021-01-11 13:43       ` Ahmed S. Darwish
2021-01-11 13:59         ` John Garry [this message]
2021-01-11 14:28           ` Ahmed S. Darwish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccddbd5e-ec63-934e-c15a-7263aeaa24ce@huawei.com \
    --to=john.garry@huawei.com \
    --cc=a.darwish@linutronix.de \
    --cc=artur.paszkiewicz@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=dwagner@suse.de \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=yanaijie@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).