All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Brian King <brking@linux.vnet.ibm.com>
Cc: wenxiong@linux.vnet.ibm.com, linux-scsi@vger.kernel.org,
	kexec@lists.infradead.org, James.Bottomley@HansenPartnership.com,
	anton@samba.org, hch@lst.de
Subject: Re: [PATCH RESEND 2/5] kexec: Export kexec_in_progress
Date: Mon, 08 Dec 2014 15:38:33 -0600	[thread overview]
Message-ID: <87vbllstye.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <5486148F.6020208@linux.vnet.ibm.com> (Brian King's message of "Mon, 08 Dec 2014 15:13:51 -0600")

Brian King <brking@linux.vnet.ibm.com> writes:

> On 12/02/2014 12:49 PM, Brian King wrote:
>> On 12/02/2014 12:47 PM, Brian King wrote:
>>> A kexec boot for some ipr SAS adapters was seen to take ~20 seconds
>>> just doing ipr adapter initialization. This is due to the fact that
>>> a kexec invokes the driver's shutdown handler which places the adapter
>>> into a state that requires a hard reset and resulting firmware initialization
>>> to be usable again, which takes significant time. By exporting kexec_in_progress,
>>> this process can be optimized significantly in the driver by essentially
>>> placing the adapter into a state where this hardware reset and re-initialization
>>> can be bypassed, eliminating this delay in kexec boot.
>>>
>>> Cc: Eric Biederman <ebiederm@xmission.com>
>>> Cc: kexec <kexec@lists.infradead.org>
>>> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
>>> ---
>>>
>>>  kernel/kexec.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff -puN kernel/kexec.c~kexec_export_in_prog kernel/kexec.c
>>> --- scsi-queue/kernel/kexec.c~kexec_export_in_prog	2014-12-02 12:13:22.820325731 -0600
>>> +++ scsi-queue-bjking1/kernel/kexec.c	2014-12-02 12:13:22.825325687 -0600
>>> @@ -2768,3 +2768,5 @@ int kernel_kexec(void)
>>>  	mutex_unlock(&kexec_mutex);
>>>  	return error;
>>>  }
>>> +
>>> +EXPORT_SYMBOL_GPL(kexec_in_progress);
>>> _
>>>
>> 
>> Eric,
>> 
>> Can I get your ack on this so this can go through the scsi tree? The last time I sent this
>> out you had some issues with the patch description.
>
> Eric - can I get your ack here?

You can have my nack.

We really shouldn't need to special case things for kexec here.  Why do
you do the full shutdown that is so slow to get out of?  Does it really
make reboots more reliable?  If you need it for a reboot why don't you
need it for a kexec reboot?  You certainly need to stop all dma in
both cases.

If it really matters to device drivers we need to refactor and make the
callbacks make sense, be maintainable.  Right now caring that it is
kexec vs reboot seems broken.

Now maybe I am wrong here, and there are some good really good reasons
for wanting to do a much stronger shutdown on reboot but at least
skimming through the change longs of the associated patches I am not
seeing the reason for making all of these changes conditional on kexec.

What I am seeing is driver code getting really complicated possibly
beyond the ability of anyone to sanely test.

Eric

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: ebiederm@xmission.com (Eric W. Biederman)
To: Brian King <brking@linux.vnet.ibm.com>
Cc: James.Bottomley@HansenPartnership.com, hch@lst.de,
	linux-scsi@vger.kernel.org, wenxiong@linux.vnet.ibm.com,
	anton@samba.org, kexec@lists.infradead.org
Subject: Re: [PATCH RESEND 2/5] kexec: Export kexec_in_progress
Date: Mon, 08 Dec 2014 15:38:33 -0600	[thread overview]
Message-ID: <87vbllstye.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <5486148F.6020208@linux.vnet.ibm.com> (Brian King's message of "Mon, 08 Dec 2014 15:13:51 -0600")

Brian King <brking@linux.vnet.ibm.com> writes:

> On 12/02/2014 12:49 PM, Brian King wrote:
>> On 12/02/2014 12:47 PM, Brian King wrote:
>>> A kexec boot for some ipr SAS adapters was seen to take ~20 seconds
>>> just doing ipr adapter initialization. This is due to the fact that
>>> a kexec invokes the driver's shutdown handler which places the adapter
>>> into a state that requires a hard reset and resulting firmware initialization
>>> to be usable again, which takes significant time. By exporting kexec_in_progress,
>>> this process can be optimized significantly in the driver by essentially
>>> placing the adapter into a state where this hardware reset and re-initialization
>>> can be bypassed, eliminating this delay in kexec boot.
>>>
>>> Cc: Eric Biederman <ebiederm@xmission.com>
>>> Cc: kexec <kexec@lists.infradead.org>
>>> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
>>> ---
>>>
>>>  kernel/kexec.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff -puN kernel/kexec.c~kexec_export_in_prog kernel/kexec.c
>>> --- scsi-queue/kernel/kexec.c~kexec_export_in_prog	2014-12-02 12:13:22.820325731 -0600
>>> +++ scsi-queue-bjking1/kernel/kexec.c	2014-12-02 12:13:22.825325687 -0600
>>> @@ -2768,3 +2768,5 @@ int kernel_kexec(void)
>>>  	mutex_unlock(&kexec_mutex);
>>>  	return error;
>>>  }
>>> +
>>> +EXPORT_SYMBOL_GPL(kexec_in_progress);
>>> _
>>>
>> 
>> Eric,
>> 
>> Can I get your ack on this so this can go through the scsi tree? The last time I sent this
>> out you had some issues with the patch description.
>
> Eric - can I get your ack here?

You can have my nack.

We really shouldn't need to special case things for kexec here.  Why do
you do the full shutdown that is so slow to get out of?  Does it really
make reboots more reliable?  If you need it for a reboot why don't you
need it for a kexec reboot?  You certainly need to stop all dma in
both cases.

If it really matters to device drivers we need to refactor and make the
callbacks make sense, be maintainable.  Right now caring that it is
kexec vs reboot seems broken.

Now maybe I am wrong here, and there are some good really good reasons
for wanting to do a much stronger shutdown on reboot but at least
skimming through the change longs of the associated patches I am not
seeing the reason for making all of these changes conditional on kexec.

What I am seeing is driver code getting really complicated possibly
beyond the ability of anyone to sanely test.

Eric

  reply	other threads:[~2014-12-08 21:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 18:47 [PATCH RESEND 2/5] kexec: Export kexec_in_progress Brian King
2014-12-02 18:47 ` Brian King
2014-12-02 18:49 ` Brian King
2014-12-02 18:49   ` Brian King
2014-12-08 21:13   ` Brian King
2014-12-08 21:13     ` Brian King
2014-12-08 21:38     ` Eric W. Biederman [this message]
2014-12-08 21:38       ` Eric W. Biederman
2014-12-10 22:52       ` Brian King
2014-12-10 22:52         ` Brian King
2014-12-02 21:24 ` wenxiong
2014-12-02 21:24   ` wenxiong

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=87vbllstye.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=anton@samba.org \
    --cc=brking@linux.vnet.ibm.com \
    --cc=hch@lst.de \
    --cc=kexec@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=wenxiong@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.