All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian King <brking@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Anton Blanchard <anton@samba.org>
Cc: james.smart@broadcom.com, dick.kennedy@broadcom.com,
	jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
	jk@ozlabs.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: lpfc: Add shutdown method for kexec
Date: Tue, 14 Feb 2017 08:56:15 -0600	[thread overview]
Message-ID: <39054c0e-c0f3-a62d-2c71-469798727bfd@linux.vnet.ibm.com> (raw)
In-Reply-To: <1487037886.23576.16.camel@kernel.crashing.org>

On 02/13/2017 08:04 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2017-02-13 at 15:57 -0600, Brian King wrote:
>> If we do transition to use remove rather than shutdown, I think we
>> want
>> some way for a device driver to know whether we are doing kexec or
>> not.
>> A RAID adapter with a write cache is going to want to flush its write
>> cache on a PCI hotplug remove, but for a kexec, its going to want to
>> skip
>> that so the kexec is faster. Today, since kexec looks like a reboot,
>> rather than a shutdown, we can skip the flush on a reboot, since its
>> technically not needed there either.
> 
> What happens if a non-flushed adapter gets a PERST ?

It depends on the adapter, so it really needs to be a policy in the device
driver. For any adapter that has a non volatile write cache, data must preserved,
otherwise the write cache is not truly non volatile. For adapters with a volatile
write cache, then its subject to the adapter hardware. For ipr adapters
that have a volatile cache, they do guarantee the data is preserved across
a PERST.

> I wouldn't trust that 'don't have to flush' magic ...

I really don't think we want to force RAID adapters that have gigabytes of
*non volatile* write cache to flush their cache when we are merely performing
a kexec. This can take several minutes in the worst case scenarios.

-Brian

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center

  reply	other threads:[~2017-02-14 14:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-12 21:49 [PATCH] scsi: lpfc: Add shutdown method for kexec Anton Blanchard
2017-02-12 23:14 ` Benjamin Herrenschmidt
2017-02-12 23:47   ` Anton Blanchard
2017-02-13  0:21     ` Eric W. Biederman
2017-02-13  1:01       ` Benjamin Herrenschmidt
2017-02-13 21:57         ` Brian King
2017-02-14  2:04           ` Benjamin Herrenschmidt
2017-02-14 14:56             ` Brian King [this message]
2017-02-15  2:44               ` Eric W. Biederman
2017-02-14  2:45           ` Eric W. Biederman
2017-02-14  3:39             ` Benjamin Herrenschmidt
2017-03-06 14:52 ` Mauricio Faria de Oliveira
2017-03-07  3:46   ` Martin K. Petersen
2017-03-07  5:24     ` Benjamin Herrenschmidt
2017-03-07 12:51       ` Mauricio Faria de Oliveira
2017-03-08  1:29         ` Martin K. Petersen

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=39054c0e-c0f3-a62d-2c71-469798727bfd@linux.vnet.ibm.com \
    --to=brking@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=dick.kennedy@broadcom.com \
    --cc=ebiederm@xmission.com \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jk@ozlabs.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.