From: Mike Christie <michaelc@cs.wisc.edu>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] sdd scsi-ml event wq
Date: Fri, 28 May 2004 03:00:28 -0700 [thread overview]
Message-ID: <40B70DBC.4020400@cs.wisc.edu> (raw)
In-Reply-To: <20040528091825.GA17960@devserv.devel.redhat.com>
Arjan van de Ven wrote:
> On Fri, May 28, 2004 at 02:07:03AM -0700, Mike Christie wrote:
>
>>I agree with you, and I do not have a good answer. When the system is
>>failing
>>memory allocations it is difficult to do a lot of things. I was thinking
>>that
>>in such an extreme situation that it would be acceptable for events to fail.
>>Would it be better to have the API set a timer and retry at a later time? I
>>was
>>thinking you could end up with a long backlog of events that may be
>>worthless
>>by the time the system can allocate memory - which is why I put in the
>>mempool (I know that they are not magic and will fail too though). I am open
>>to ideas.
>
>
> well what would suck is if userspace only sees a last "loop down"
> event but then never sees the final "loop up".
I think the kobject hotplug code will already drop events without
indication that it failed :( Look at kset_hotplug().
> The problem is that the memory allocation issue is more critical here than
> in typical code, simply because on loop down you may not be able to do IO to
> your swap device/filesystem to free memory.
>
> Maybe we need to do a spare allocated event that is ONLY used for "eh the
> queue overflowed, assume all state is lost, rediscover everything". That way
> userland CAN know about the loss of state, and perform full
> discovery/recovery.
>
Even if we had the spare event, the kobject hotplug code is kmallocing
memory with GFP_KERNEL and will probably fail if we are in a situation
where memory is so tight that we went to our event mempool and those reserves
failed. I am sure that could all be fixed, but we would need to extend a
priority to the hotplug code so it knows that this event is special
(Well, you would also have to go through __call_usermodehelper which could
fail too).
For the short term would it be best to harden the SCSI side of the API then
worry about the API we are using, or is the kobject_hotplug/userspace route not
looking to be the best option?
next prev parent reply other threads:[~2004-05-28 10:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-28 7:59 [PATCH] sdd scsi-ml event wq Mike Christie
2004-05-28 8:15 ` Arjan van de Ven
2004-05-28 9:07 ` Mike Christie
2004-05-28 9:18 ` Arjan van de Ven
2004-05-28 10:00 ` Mike Christie [this message]
2004-06-07 7:54 ` Douglas Gilbert
-- strict thread matches above, loose matches on Subject: below --
2004-06-03 10:46 Martin Peschke3
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=40B70DBC.4020400@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=arjanv@redhat.com \
--cc=linux-scsi@vger.kernel.org \
/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