Re: [PATCH 1/6] libata: Do not retry commands with valid autosense

2015-08-02 Thread Tejun Heo
Hello, On Fri, Jul 31, 2015 at 03:02:03PM +0200, Hannes Reinecke wrote: > If a failed command has a valid autosense there is no need to > retry it on the ATA level; at best we're incurring the same > error again. So rather not retry it here, but leave it to > the SCSI layer to decide if a retry is

Re: [PATCH 0/6] ZAC host-aware device support

2015-08-02 Thread Tejun Heo
On Fri, Jul 31, 2015 at 03:02:02PM +0200, Hannes Reinecke wrote: > Hi all, > > here is a patchset for adding ZAC host-aware device support to libata. > Main bits are translations for ZBC IN and ZBC OUT; others are the > required plumbing like generating the correct VPD pages. > James, do you requi

Re: [PATCH 1/6] libata: Do not retry commands with valid autosense

2015-08-03 Thread Tejun Heo
Hello, On Mon, Aug 03, 2015 at 09:31:57AM +0200, Hannes Reinecke wrote: > The whole point of the autosense feature is that you do _not_ > have to fall back to the original trial-and-error libata EH, > but know exactly what the problem is. Plus any retry will be giving > us (in most cases) exactly

[PATCH libata/for-4.2-fixes] libata: disable NCQ autosense

2015-08-03 Thread Tejun Heo
>From 8c0fa3e7ca99b0d6d96cb2cf194a912f643da7c5 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 3 Aug 2015 11:10:45 -0400 fe7173c206de ("libata: Implement support for sense data reporting") and subsequent patches enabled NCQ autosense reporting; unfortunately, this breaks libat

Re: [PATCH 1/6] libata: Do not retry commands with valid autosense

2015-08-03 Thread Tejun Heo
Adding a bit. On Mon, Aug 03, 2015 at 11:04:28AM -0400, Tejun Heo wrote: > Ugh... so this is from NCQ autosense thing. Now ATA devices reports > sense data too which trumps AC_ERR_DEV so libata EH decides to retry > even when the device indicates unrecoverable error. Urgh... we >

Re: [PATCH libata/for-4.2-fixes] libata: disable NCQ autosense

2015-08-03 Thread Tejun Heo
On Mon, Aug 03, 2015 at 11:16:21AM -0400, Tejun Heo wrote: > From 8c0fa3e7ca99b0d6d96cb2cf194a912f643da7c5 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Mon, 3 Aug 2015 11:10:45 -0400 > > fe7173c206de ("libata: Implement support for sense data reporting") > an

Re: [PATCH 1/6] libata: Do not retry commands with valid autosense

2015-08-03 Thread Tejun Heo
Hello, James. On Mon, Aug 03, 2015 at 08:42:43AM -0700, James Bottomley wrote: > I'd think it would be the same reason as all modern transports: it's > faster and allows processing of sense data in-band. Under the old > regime, the device is effectively frozen until you collect the data. > Under

Re: [PATCH 1/6] libata: Do not retry commands with valid autosense

2015-08-03 Thread Tejun Heo
Hello, James. On Mon, Aug 03, 2015 at 09:44:06AM -0700, James Bottomley wrote: > I'm not arguing that *this* patch is the best way to do it. You asked > *why* autosense and that's what I answered. I think there's time to Heh, that was mostly me being confused. I was thinking NCQ autosense was

Re: [PATCH 1/6] libata: Do not retry commands with valid autosense

2015-08-03 Thread Tejun Heo
Hello, Hannes. On Mon, Aug 03, 2015 at 06:47:46PM +0200, Hannes Reinecke wrote: > At the moment NCQ autosense is mostly used to provide the host with more > details for a failed I/O. The typical case here is (no small surprise) > ZAC disks, which use autosense to inform the host about > a malforme

Re: IO failures with SMR drives at latest kernel versions

2015-08-22 Thread Tejun Heo
Hello, On Fri, Aug 21, 2015 at 10:37:44PM -0700, Anatol Pomozov wrote: ... > https://bbs.archlinux.org/viewtopic.php?id=199351 A lot of people > report the same problem as mine. It was found that the problem appears > only starting from 3.19, with kernel 3.18 or Windows these drives work > fine. I

Re: [PATCH v5 3/4] ata: Enabling ATA Command Priorities

2016-10-13 Thread Tejun Heo
Hello, On Thu, Oct 13, 2016 at 04:00:30PM -0700, Adam Manzanares wrote: > This patch checks to see if an ATA device supports NCQ command priorities. > If so and the user has specified an iocontext that indicates > IO_PRIO_CLASS_RT then we build a tf with a high priority command. > > This is done

Re: [PATCH v5 4/4] ata: ATA Command Priority Disabled By Default

2016-10-13 Thread Tejun Heo
Hello, Adam. Sorry about late reply. Was on vacation. On Thu, Oct 13, 2016 at 04:00:31PM -0700, Adam Manzanares wrote: > Add a sysfs entry to turn on priority information being passed > to a ATA device. By default this feature is turned off. > > This patch depends on ata: Enabling ATA Command P

Re: [PATCH v6 1/3] block: Add iocontext priority to request

2016-10-19 Thread Tejun Heo
Hello, On Mon, Oct 17, 2016 at 11:27:28AM -0700, Adam Manzanares wrote: > Patch adds an association between iocontext ioprio and the ioprio of a > request. This is done to enable request based drivers the ability to > act on priority information stored in the request. An example being > ATA device

Re: [PATCH v6 3/3] ata: ATA Command Priority Disabled By Default

2016-10-19 Thread Tejun Heo
On Mon, Oct 17, 2016 at 11:27:30AM -0700, Adam Manzanares wrote: > Add a sysfs entry to turn on priority information being passed > to a ATA device. By default this feature is turned off. > > This patch depends on ata: Enabling ATA Command Priorities > > Signed-off-by: Adam Manzanares > --- > d

Re: [PATCH v6 2/3] ata: Enabling ATA Command Priorities

2016-10-19 Thread Tejun Heo
s done to improve the tail latency of commands that are high priority by passing priority to the device. tj: Removed trivial ata_ncq_prio_enabled() and open-coded the test. Signed-off-by: Adam Manzanares Signed-off-by: Tejun Heo --- drivers/ata/libata-core.

Re: [PATCH v6 0/3] Enabling ATA Command Priorities

2016-10-19 Thread Tejun Heo
On Mon, Oct 17, 2016 at 11:27:27AM -0700, Adam Manzanares wrote: > This patch builds ATA commands with high priority if the iocontext of a > process > is set to real time. The goal of the patch is to improve tail latencies of > workloads that use higher queue depths. This requires setting the ioc

Re: [PATCH v6 3/3] ata: ATA Command Priority Disabled By Default

2016-10-19 Thread Tejun Heo
This patch depends on ata: Enabling ATA Command Priorities tj: Renamed ncq_prio_on to ncq_prio_enable and removed trivial ata_ncq_prio_on() and open-coded the test. Signed-off-by: Adam Manzanares Signed-off-by: Tejun Heo --- drivers/ata/libahci.c | 1 + drivers/ata/libata-core.c | 3 ++-

Re: [PATCH] mvsas: fix error return code in mvs_task_prep()

2016-10-31 Thread Tejun Heo
On Mon, Oct 31, 2016 at 03:04:10PM +, Wei Yongjun wrote: > From: Wei Yongjun > > Fix to return error code -ENOMEM from the error handling > case instead of 0, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun Applied to libata/for-4.9-fixes. Thanks. -- tejun -- To unsub

Re: [PATCH] mvsas: fix error return code in mvs_task_prep()

2016-11-01 Thread Tejun Heo
On Mon, Oct 31, 2016 at 10:29:26AM -0600, Tejun Heo wrote: > On Mon, Oct 31, 2016 at 03:04:10PM +, Wei Yongjun wrote: > > From: Wei Yongjun > > > > Fix to return error code -ENOMEM from the error handling > > case instead of 0, as done elsewhere in this function.

Re: [PATCH] ata: xgene: Enable NCQ support for APM X-Gene SATA controller hardware v1.1

2016-11-09 Thread Tejun Heo
Hello, On Wed, Sep 14, 2016 at 04:15:00PM +0530, Rameshwar Sahu wrote: > > @@ -821,8 +823,6 @@ static int xgene_ahci_probe(struct platform_device > > *pdev) > > dev_warn(&pdev->dev, "%s: Error reading > > device info. Assume version1\n", > >

Re: [PATCH] ata: xgene: Enable NCQ support for APM X-Gene SATA controller hardware v1.1

2016-11-15 Thread Tejun Heo
Hello, Rameshwar. On Fri, Nov 11, 2016 at 01:36:28PM +0530, Rameshwar Sahu wrote: > Hi Tejun, > > On Wed, Nov 9, 2016 at 10:15 PM, Tejun Heo wrote: > > Hello, > > > > On Wed, Sep 14, 2016 at 04:15:00PM +0530, Rameshwar Sahu wrote: > >> > @@ -821,8 +823,

Re: [PATCH v2] ata: xgene: Enable NCQ support for APM X-Gene SATA controller hardware v1.1

2017-01-18 Thread Tejun Heo
Hello, On Tue, Jan 17, 2017 at 08:25:21PM +0530, Rameshwar Sahu wrote: > Hi Tejun, > > On Fri, Nov 18, 2016 at 3:15 PM, Rameshwar Prasad Sahu wrote: > > This patch enables NCQ support for APM X-Gene SATA controller hardware v1.1 > > that was broken with hardware v1.0. Second thing, here we shoul

Re: [PATCH v4 0/4]ata: Fixes related to APM X-Gene SATA host controller driver.

2014-07-29 Thread Tejun Heo
On Tue, Jul 29, 2014 at 12:24:48PM +0530, Suman Tripathi wrote: > This patch set contains a couple of fixes related to APM X-Gene SATA > controller driver. > > v2 Change: >1. Drop the Link down retry patch from this patch set. > > v4 Change: >1. Drop the patch to fix the csr-mask in dts f

Re: [PATCH v4 0/4]ata: Fixes related to APM X-Gene SATA host controller driver.

2014-07-29 Thread Tejun Heo
On Tue, Jul 29, 2014 at 08:05:45PM +0530, Suman Tripathi wrote: > Hi, > > Applied 1 and 3 to libata/for-3.17. 4 doesn't apply. Also, please > prefix the patches with "ahci_xgene: " from now on. > > [suman] : You mean the "Remove NCQ patch" is not applied. Any reason for > that ? I meant that t

Re: [PATCH v6 1/2] ahci_xgene: Removing NCQ support from the APM X-Gene SoC AHCI SATA Host Controller driver.

2014-08-16 Thread Tejun Heo
On Fri, Aug 08, 2014 at 09:44:25PM +0530, Suman Tripathi wrote: > This patch removes the NCQ support from the APM X-Gene SoC AHCI > Host Controller driver as it doesn't support it. > > Signed-off-by: Loc Ho > Signed-off-by: Suman Tripathi Applied to libata/for-3.17-fixes w/ stable cc'd. Thanks

Re: [PATCH v7 2/3] ahci_xgene: Skip the PHY and clock initialization if already configured by the firmware.

2014-08-19 Thread Tejun Heo
On Tue, Aug 19, 2014 at 12:01:50PM +0530, Suman Tripathi wrote: > This patch implements the feature to skip the PHY and clock > initialization if it is already configured by the firmware. > > Signed-off-by: Loc Ho > Signed-off-by: Suman Tripathi ... > +static int xgene_ahci_is_memram_inited(stru

Re: [PATCH v7 3/3] ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver.

2014-08-19 Thread Tejun Heo
On Tue, Aug 19, 2014 at 12:01:51PM +0530, Suman Tripathi wrote: > The link down issue in first attempt happens due to 2 H/W errata below: > > 1. Due to HW errata, during speed negotiation, sometimes controller > is not able to detect ALIGN at GEN3(6Gbps) within 54.6us results in > a timeout. This

Re: [PATCH v7 3/3] ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver.

2014-08-21 Thread Tejun Heo
On Thu, Aug 21, 2014 at 01:48:00PM +0530, Suman Tripathi wrote: > [suman] : The problem is COMRESET didn't failed. I meant the hardreset is > successful (return 0) but the device is not detected even if device is > present due to speed negotiation failure. For that reason I check for the > Pxstatus

Re: [PATCH v8 3/3] ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver.

2014-08-25 Thread Tejun Heo
On Sun, Aug 24, 2014 at 12:07:27AM +0530, Suman Tripathi wrote: > This patch addresses two HW erratas as described below by retrying the > COMRESET: > > 1. During speed negotiation, controller is not able to detect ALIGN > at GEN3(6Gbps) within 54.6us and results in a timeout. This issue can > be

Re: [PATCH v8 3/3] ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver.

2014-08-26 Thread Tejun Heo
On Tue, Aug 26, 2014 at 12:17:35PM +0530, Suman Tripathi wrote: > Didn't I ask you to update the comment to explain what's going on? > [suman] : can you specifically tell which part of the comment is not clear > and need more explanation? The comment on top of the function doesn't seem to match wh

Re: [RFC v2 5/6] mptsas: use async probe

2014-09-05 Thread Tejun Heo
On Thu, Sep 04, 2014 at 11:37:26PM -0700, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > Its reported that mptsas can at times take over 30 seconds > to recognize SCSI storage devices [0], this is done on the > driver's probe path. Use the the new asynch probe to > circumvent systemd fr

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
On Thu, Sep 04, 2014 at 11:37:24PM -0700, Luis R. Rodriguez wrote: ... > + /* > + * I got SIGKILL, but wait for 60 more seconds for completion > + * unless chosen by the OOM killer. This delay is there as a > + * workaround for boot failure caused

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
rk for every driver. > a WARN_ONCE() would enable us to find the drivers that need this new > async probe "feature". This whole approach of trying to mark specific drivers as needing "async probing" is completely broken for the problem at hand. It can't address the pr

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
Hello, On Fri, Sep 05, 2014 at 09:44:05AM -0700, Dmitry Torokhov wrote: > Which problem are we talking about here though? It does solve the slow device > stalling the rest if the kernel booting (non-module case) for me. The other one. The one with timeout. Neither cxgb4 or pata_marvell has slow

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
Hello, Dmitry. On Fri, Sep 05, 2014 at 11:10:03AM -0700, Dmitry Torokhov wrote: > I do not agree that it is actually user-visible change: generally speaking you > do not really know if device is there or not. They come and go. Like I said, > consider all permutations, with hot-pluggable buses, def

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
On Sat, Sep 06, 2014 at 07:29:56AM +0900, Tejun Heo wrote: > It is for storage devices which always have guaranteed synchronous > probing on module load and well-defined probing order. Sure, modern > setups are a lot more dynamic but I'm quite certain that there are > setups

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
Hello, Luis. On Fri, Sep 05, 2014 at 11:12:17AM -0700, Luis R. Rodriguez wrote: > Meanwhile we are allowing a major design consideration such as a 30 > second timeout for both init + probe all of a sudden become a hard > requirement for device drivers. I see your point but can't also be > introduc

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
Hello, Dmitry. On Fri, Sep 05, 2014 at 03:49:17PM -0700, Dmitry Torokhov wrote: > On Sat, Sep 06, 2014 at 07:31:39AM +0900, Tejun Heo wrote: > > On Sat, Sep 06, 2014 at 07:29:56AM +0900, Tejun Heo wrote: > > > It is for storage devices which always have guaranteed synchronou

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
Hello, On Fri, Sep 05, 2014 at 03:52:48PM -0700, Dmitry Torokhov wrote: > Ahem... and they sure it works reliably with large storage arrays? With > SCSI doing probing asynchronously already? I believe this has been mentioned before too but, yes, SCSI device probing is asynchronous and parallelize

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-05 Thread Tejun Heo
Hey, On Fri, Sep 05, 2014 at 04:22:42PM -0700, Dmitry Torokhov wrote: > > I don't get it. This is a behavior userland already depends on for > > boots. What's there to agree or disagree? This is just a fact that > > we can't do this w/o disturbing some userlands in a major way. > > I am just e

Re: [PATCH 1/4] libata: consolidate ata_dev_classify()

2014-09-05 Thread Tejun Heo
Hello, Hannes. Sorry about the delay. On Wed, Jul 30, 2014 at 09:55:08AM +0200, Hannes Reinecke wrote: > ata_dev_classify() just uses the 'lbah' and 'lbam' > fields from the taskfile, so we can as well use those > as arguments and rip out the custom code from sas_ata. I wonder whether it'd easie

Re: [PATCH 3/4] libata-scsi: Update SATL for ZAC drives

2014-09-05 Thread Tejun Heo
On Wed, Jul 30, 2014 at 09:55:10AM +0200, Hannes Reinecke wrote: > ZAC (zoned-access command) drives translate into ZBC (Zoned block > command) device type for SCSI. So implement the correct mappings > into libata-scsi and update the SCSI command set versions. Patch 2-3 look good to me. Thanks.

Re: [PATCH v9 3/3] ahci_xgene: Fix the link down in first attempt for the APM X-Gene SoC AHCI SATA host controller driver.

2014-09-05 Thread Tejun Heo
On Thu, Aug 28, 2014 at 02:51:22PM +0530, Suman Tripathi wrote: > Due to HW errata the APM X-Gene AHCI SATA host controller reports link > down even if the device presence is detected. This issue is due to speed > negotiation failure. This patch implements the algorithm to retry the > COMRESET if P

Re: [PATCH v9 2/3] ahci_xgene: Skip the PHY and clock initialization if already configured by the firmware.

2014-09-05 Thread Tejun Heo
On Thu, Aug 28, 2014 at 02:51:21PM +0530, Suman Tripathi wrote: > This patch implements the feature to skip the PHY and clock > initialization if it is already configured by the firmware. > > Signed-off-by: Loc Ho > Signed-off-by: Suman Tripathi Applied to libata/for-3.17-fixes. Thanks. -- t

Re: [PATCH 1/4] libata: consolidate ata_dev_classify()

2014-09-06 Thread Tejun Heo
Hello, On Sat, Sep 06, 2014 at 10:21:51AM +0200, Hannes Reinecke wrote: > Well, yes, in principle. I was looking into that, too. > But then I figured that moving to ata_taskfile would be a major overhaul for > libsas, which would be quite beyond scope here. > And all for a puny little patch. Hmm?

Re: [PATCH 1/4] libata: consolidate ata_dev_classify()

2014-09-07 Thread Tejun Heo
On Sun, Sep 07, 2014 at 01:24:47PM +0200, Hannes Reinecke wrote: > Which was actually my first attempt, but then I figured I'd be > increasing the stacksize in doing so. > But sure, if you're okay with it I'll be redoing the patch. The struct is only 32 bytes. I don't think it's gonna make any me

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
Hello, Luis. On Mon, Sep 08, 2014 at 06:04:23PM -0700, Luis R. Rodriguez wrote: > > I have no idea how the selection should be. It could be per-insmod or > > maybe just a system-wide flag with explicit exceptions marked on > > drivers is good enough. I don't know. > > Its perfectly understandab

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
On Tue, Sep 09, 2014 at 10:10:59AM +0900, Tejun Heo wrote: > * Identify cases which can't be asynchronous and make them > synchronous. e.g. keep who's doing request_module() and avoid > asynchronous probing if current is probing one of those. That wouldn't work as we

Re: WARNING in block layer triggered in 3.17-rc3

2014-09-08 Thread Tejun Heo
Hello, On Mon, Sep 08, 2014 at 01:42:44PM -0400, Alan Stern wrote: > > This looks like a nasty hack. In theory the QUEUE_FLAG_INIT_DONE should > > be unset on blk_unregister_queue() to match the teardown; it's only > > accident it isn't. del_gendisk() in sd_remove() is supposed to tear a > > lot

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
On Tue, Sep 09, 2014 at 10:10:59AM +0900, Tejun Heo wrote: > I'm not too convinced this is such a difficult problem to figure out. > We already have most of logic in place and the only thing missing is > how to switch it. Wouldn't something like the following work? > &g

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
On Mon, Sep 08, 2014 at 06:26:04PM -0700, Luis R. Rodriguez wrote: > > Alternatively, add a module-generic param "async_probe" or whatever > > and use that to switch the behavior should work too. I don't know > > which way is better but either should work fine. > > I take it by this you meant a g

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
Hello, On Mon, Sep 08, 2014 at 06:38:34PM -0700, Luis R. Rodriguez wrote: > OK then one only concern I would have with this is that the presence > of such a flag doesn't necessarily mean that all drivers on a system > have been tested for asynch probe yet. I'd feel much more comfortable Given tha

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
Hello, On Mon, Sep 08, 2014 at 07:28:58PM -0700, Luis R. Rodriguez wrote: > > Given that the behvaior change is from driver core and that device > > probing can happen post-loading anyway, > > Ah but lets not forget Dmitry's requirement which is for in-kernel > drivers. We'd need to deal with bot

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
On Mon, Sep 08, 2014 at 07:57:28PM -0700, Luis R. Rodriguez wrote: > > I think we > > just should make exceptions sensible so that it works fine in practice > > for now (and I don't think that'd be too hard). So, the only > > cooperation necessary from userland would be just saying "I don't > > wa

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-08 Thread Tejun Heo
Hello, On Mon, Sep 08, 2014 at 08:19:12PM -0700, Luis R. Rodriguez wrote: > On the systemd side of things it should enable this sysctl and for > older kernels what should it do? Supposing the change is backported via -stable, it can try to set the sysctl on all kernels. If the knob doesn't exist

Re: WARNING in block layer triggered in 3.17-rc3

2014-09-09 Thread Tejun Heo
Hello, Alan. On Tue, Sep 09, 2014 at 11:08:22AM -0400, Alan Stern wrote: > Sorry, the meaning wasn't clear. I meant that the existing code > doesn't work. The patch seems to work okay (except that I can't use > queue_flag_test_and_set because the queue isn't locked at that point). > I'll sub

Re: [PATCH] Block: fix unbalanced bypass-disable in blk_register_queue

2014-09-09 Thread Tejun Heo
we get a WARNING because of the unbalanced calls to > blk_queue_bypass_end(). > > This patch fixes the problem by making blk_register_queue() call > blk_queue_bypass_end() only the first time the queue is registered. > > Signed-off-by: Alan Stern > CC: Tejun Heo > CC: Jam

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-09 Thread Tejun Heo
Hey, James. On Tue, Sep 09, 2014 at 12:35:46PM -0700, James Bottomley wrote: > I don't have very strong views on this one. However, I've got to say > from a systems point of view that if the desire is to flag when the > module is having problems, probing and initializing synchronously in a > thre

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-09 Thread Tejun Heo
Hello, On Tue, Sep 09, 2014 at 03:26:02PM -0700, James Bottomley wrote: > > We no longer report back error on probe failure on module load. > > Yes, we do; for every probe failure of a device on a driver we'll print > a warning (see drivers/base/dd.c). Now if someone is proposing we > should rep

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-09 Thread Tejun Heo
Hello, James. On Tue, Sep 09, 2014 at 03:46:23PM -0700, James Bottomley wrote: > If you want the return of an individual device probe a log scraper gives > it to you ... and nothing else does currently. The advantage of the > prink in dd.c is that it's standard for everything and can be scanned >

Re: [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-09 Thread Tejun Heo
On Tue, Sep 09, 2014 at 12:25:29PM +0900, Tejun Heo wrote: > Hello, > > On Mon, Sep 08, 2014 at 08:19:12PM -0700, Luis R. Rodriguez wrote: > > On the systemd side of things it should enable this sysctl and for > > older kernels what should it do? > > Supposing t

Re: [PATCH] ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

2014-09-12 Thread Tejun Heo
On Fri, Sep 12, 2014 at 01:24:08PM +0530, Suman Tripathi wrote: > This patch fixes the error print invalid resource for the APM X-Gene > SoC AHCI SATA Host Controller driver. This print was due to the fact > that the controller 3 don't have a mux resource. This didn't result > in any errors but the

Re: [PATCH] ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

2014-09-14 Thread Tejun Heo
Hello, On Sun, Sep 14, 2014 at 11:36:51AM +0530, Suman Tripathi wrote: > We can maintain same piece (IS_ERR(ctx->csr_mux)), then we can do the > below instead of NULL ?? > > ctx->csr_mux = res ? devm_ioremap_resource(dev, res) : ERR_PTR(-EINVAL); Setting it to NULL on failure would probably mak

Re: [PATCH] ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

2014-09-15 Thread Tejun Heo
On Mon, Sep 15, 2014 at 01:10:01PM +0530, Suman Tripathi wrote: > [suman] : So the posted version is acceptable ? Any others comments on this > patch ? I'm suggesting setting ctx->cs_mux to NULL on failure. IOW, if (res) { ctx->csr_mux = devm_ioremap_resources();

Re: boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-22 Thread Tejun Heo
On Tue, Sep 23, 2014 at 07:55:54AM +0200, Christoph Hellwig wrote: > Jens, > > can we simply get these commits reverted from now if there's no better > fix? I'd hate to have this boot stall in the first kernel with blk-mq > support for scsi. Patches going out right now. Thanks. -- tejun -- To

Re: boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-22 Thread Tejun Heo
On Tue, Sep 23, 2014 at 01:56:48AM -0400, Tejun Heo wrote: > On Tue, Sep 23, 2014 at 07:55:54AM +0200, Christoph Hellwig wrote: > > Jens, > > > > can we simply get these commits reverted from now if there's no better > > fix? I'd hate to have this boot

Re: boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-22 Thread Tejun Heo
On Tue, Sep 23, 2014 at 07:59:24AM +0200, Christoph Hellwig wrote: > "[PATCHSET percpu/for-3.18] percpu_ref: implement switch_to_atomic/percpu()" > > looks way to big for 3.17, and the regression was introduced in the 3.17 > merge window. I'm not sure what was broken before, but it defintively >

Re: boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-22 Thread Tejun Heo
On Tue, Sep 23, 2014 at 02:01:41AM -0400, Tejun Heo wrote: > On Tue, Sep 23, 2014 at 07:59:24AM +0200, Christoph Hellwig wrote: > > "[PATCHSET percpu/for-3.18] percpu_ref: implement switch_to_atomic/percpu()" > > > > looks way to big for 3.17, and the regres

[PATCH block/for-3.18/core] blk-mq: start q->mq_usage_counter in atomic mode

2014-09-22 Thread Tejun Heo
>From 83b06f4fc6ca2f7f3d706a168b71c248bdada668 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 23 Sep 2014 01:58:34 -0400 blk-mq uses percpu_ref for its usage counter which tracks the number of in-flight commands and used to synchronously drain the queue on freeze. percpu_ref shutdown ta

Re: boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-22 Thread Tejun Heo
On Tue, Sep 23, 2014 at 08:09:06AM +0200, Christoph Hellwig wrote: > On Tue, Sep 23, 2014 at 02:01:41AM -0400, Tejun Heo wrote: > > On Tue, Sep 23, 2014 at 07:59:24AM +0200, Christoph Hellwig wrote: > > > "[PATCHSET percpu/for-3.18] percpu_ref: implement > &

Re: [PATCH] ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

2014-09-23 Thread Tejun Heo
On Mon, Sep 22, 2014 at 06:31:33PM +0530, Suman Tripathi wrote: > This patch fixes the error print invalid resource for the APM X-Gene > SoC AHCI SATA Host Controller driver. This print was due to the fact > that the controller 3 don't have a mux resource. This didn't result > in any errors but the

[PATCH block/for-3.17-fixes/core] blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe

2014-09-23 Thread Tejun Heo
entation. Signed-off-by: Tejun Heo Reported-by: Christoph Hellwig Link: http://lkml.kernel.org/g/20140919113815.ga10...@lst.de Fixes: add703fda981 ("blk-mq: use percpu_ref for mq usage count") Cc: Kent Overstreet Cc: Jens Axboe --- Hello, Jens, Christoph. How about this one? This

Re: [PATCH block/for-3.17-fixes/core] blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe

2014-09-23 Thread Tejun Heo
Oops, I forgot to cc Kent. Kent, the patch is at http://lkml.kernel.org/g/20140923192432.ga24...@mtj.dyndns.org On Tue, Sep 23, 2014 at 01:29:03PM -0600, Jens Axboe wrote: > The hack looks fine to me, if it passes Christophs boot stall test. The > hack isn't THAT nasty, since you already have a

Re: [PATCH block/for-3.17-fixes/core] blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe

2014-09-24 Thread Tejun Heo
On Wed, Sep 24, 2014 at 08:30:33AM -0600, Jens Axboe wrote: > On 09/24/2014 02:23 AM, Christoph Hellwig wrote: > > Thanks, this fixes the boot stall for me. > > > > Tested-by: Christoph Hellwig > > Sweet, I'll shove this off today, so we are done for 3.17 release. Cool, once it hits the block b

[PATCH percpu/for-3.18] Revert "blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe"

2014-09-24 Thread Tejun Heo
>From 9eca80461a45177e456219a9cd944c27675d6512 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 24 Sep 2014 13:07:33 -0400 This reverts commit 0a30288da1aec914e158c2d7a3482a85f632750f, which was a temporary fix for SCSI blk-mq stall issue. The following patches will fix the issue properly

Re: [PATCH block/for-3.18/core] blk-mq: start q->mq_usage_counter in atomic mode

2014-09-24 Thread Tejun Heo
On Tue, Sep 23, 2014 at 02:08:12AM -0400, Tejun Heo wrote: > From 83b06f4fc6ca2f7f3d706a168b71c248bdada668 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Tue, 23 Sep 2014 01:58:34 -0400 > > blk-mq uses percpu_ref for its usage counter which tracks the number > of in-flight

[PATCH percpu/for-3.18] blk-mq, percpu_ref: start q->mq_usage_counter in atomic mode

2014-09-24 Thread Tejun Heo
FYI, I added a paragraph explaining what happened to the temp fix at the end. The following is the applied version. Thanks. - 8< - >From 17497acbdce9506fd6a75115dee4ab80c3cc5ee5 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 24 Sep 2014 13:31:50 -0400 blk-mq uses percpu_r

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Tejun Heo
Hello, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: ... > Systemd should consider enabling async probe on device drivers > it loads through systemd-udev but probably does not want to > enable it for modules loaded through systemd-modules-load > (modules-load.d). At least on m

Re: [PATCH 33/38] libata: use __scsi_print_command()

2014-09-29 Thread Tejun Heo
On Mon, Sep 29, 2014 at 01:59:02PM +0200, Hannes Reinecke wrote: > libata already uses an internal buffer, so we should be using > __scsi_print_command() here. > > Cc: Tejun Heo > Cc: linux-...@vger.kernel.org > Cc: LKML > Signed-off-by: Hannes Reinecke Applied to lib

Re: [PATCH 33/38] libata: use __scsi_print_command()

2014-09-29 Thread Tejun Heo
On Mon, Sep 29, 2014 at 04:10:30PM +0200, Hannes Reinecke wrote: > On 09/29/2014 04:06 PM, Tejun Heo wrote: > > On Mon, Sep 29, 2014 at 01:59:02PM +0200, Hannes Reinecke wrote: > >> libata already uses an internal buffer, so we should be using > >> __scsi_print_command(

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Tejun Heo
Hello, Luis. On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: > > > + /* For now lets avoid stupid bug reports */ > > > + if (!strcmp(bus->name, "pci") || > > > + !strcmp(bus->name, "pci_express") || > > > + !strcmp(bus->name, "hid") || > > > + !strcmp(bus->name, "sdi

Re: [PATCH v2 7/7] driver-core: add preferred async probe option for built-in and modules

2014-10-06 Thread Tejun Heo
Hello, Luis. The patchset generally looks good to me. Please feel free to add Reviewed-by: Tejun Heo A question below. On Fri, Oct 03, 2014 at 02:44:43PM -0700, Luis R. Rodriguez wrote: > + bus.enable_kern_async=1 [KNL] > + This tells the kernel userspace ha

Re: [PATCH v2 7/7] driver-core: add preferred async probe option for built-in and modules

2014-10-06 Thread Tejun Heo
Hello, On Mon, Oct 06, 2014 at 10:36:27PM +0200, Luis R. Rodriguez wrote: > > Do we intend to keep this param permanently? Isn't this more of a > > temp tool to be used during development? If so, maybe we should make > > that clear with __DEVEL__ too? > > As its designed right now no, its not a

Re: [PATCH v2 7/7] driver-core: add preferred async probe option for built-in and modules

2014-10-07 Thread Tejun Heo
Hello, On Tue, Oct 07, 2014 at 01:10:46AM +0200, Luis R. Rodriguez wrote: > On Mon, Oct 06, 2014 at 05:01:18PM -0400, Tejun Heo wrote: > > For in-kernel stuff, we already have a clear > > synchronization point where we already synchronize all async calls. > > Shouldn't

Re: [PATCH v2 7/7] driver-core: add preferred async probe option for built-in and modules

2014-10-07 Thread Tejun Heo
Hello, On Tue, Oct 07, 2014 at 07:50:10PM +0200, Luis R. Rodriguez wrote: > On Tue, Oct 07, 2014 at 01:34:04PM -0400, Tejun Heo wrote: > > But you can create a new workqueue and queue all the async probing > > work items there and flush the workqueue right after > > a

Re: [PATCH 00/14] libata: SATL update

2016-04-04 Thread Tejun Heo
Hello, Hannes. Applied the series to libata/for-4.7-zac with cosmetic updates ((s64)-1 -> UINT64_MAX, kbuild warning fixes and other formatting updates). Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.o

Re: [PATCH 0/4] libata: ZAC support

2016-04-04 Thread Tejun Heo
Hello, Hannes. Except for the minor nits, looks good to me. Will wait for refresh and apply to libata/for-4.7-zac. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger

Re: [PATCH 1/4] libata: implement ZBC IN translation

2016-04-04 Thread Tejun Heo
On Mon, Apr 04, 2016 at 11:47:48AM +0200, Hannes Reinecke wrote: > +/* /** > + * ata_scsi_report_zones_complete > + * > + * Convert T-13 little-endian field representation into > + * T-10 big-endian field representation. > + */ > +static void ata_scsi_report_zones_complete(struct ata_queued_cmd *

Re: [PATCH 03/14] libata-scsi: sanitize ata_gen_ata_sense()

2016-04-04 Thread Tejun Heo
On Mon, Apr 04, 2016 at 02:26:51PM +0300, Sergei Shtylyov wrote: > >+} else { > >+/* Could not decode error */ > >+ata_dev_warn(dev, "could not decode error status 0x%x err_mask > >0x%x\n", > >"%#x" is equivalent and takes up less space. Oops, gmail for some reaso

Re: [PATCH v2 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-04-04 Thread Tejun Heo
On Mon, Apr 04, 2016 at 01:24:52PM -0700, Ming Lin wrote: > Could you help to review/ack this ATA part? > Thanks. Can you please resend me the patches? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org

Re: [PATCH v3 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-04-05 Thread Tejun Heo
2 generic definitions to scatterlist.h later. > > Reviewed-by: Christoph Hellwig > Acked-by: Bart Van Assche (for ib_srp changes) > Signed-off-by: Ming Lin For libata, Acked-by: Tejun Heo Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCHv2 05/14] libata: NCQ Encapsulation for READ LOG DMA EXT

2016-04-13 Thread Tejun Heo
On Tue, Apr 12, 2016 at 08:47:49AM +0200, Hannes Reinecke wrote: > Recent devices can use NCQ encapsulation for READ LOG DMA EXT, > so we should be using it if available. Does this have any actual benefits than being new and shiny? It's being called from EH path where we know that no other comman

Re: [PATCHv2 09/14] libata: fixup ZAC device disabling

2016-04-13 Thread Tejun Heo
On Tue, Apr 12, 2016 at 08:47:53AM +0200, Hannes Reinecke wrote: > libata device disabling is ... curious. So add the correct > definitions that we can disable ZAC devices properly. Fold into an earlier patch? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-s

Re: [PATCHv2 06/14] libata: Check log page directory before accessing pages

2016-04-13 Thread Tejun Heo
On Tue, Apr 12, 2016 at 08:47:50AM +0200, Hannes Reinecke wrote: > + log_pages = get_unaligned_le16(&ap->sector_buf[log_index]); > + if (!log_pages) { > + ata_dev_warn(dev, > + "NCQ Send/Recv Log not supported\n"); Shouldn't this be an info message? Th

Re: [PATCHv2 05/14] libata: NCQ Encapsulation for READ LOG DMA EXT

2016-04-14 Thread Tejun Heo
Hello, Hannes. On Thu, Apr 14, 2016 at 07:44:19AM +0200, Hannes Reinecke wrote: > Hehe. No, it isn't, if you look closely. > (Or make that: it _shouldn't_, and I've messed it up) > (That's what the 'fpdma' parameter is for) > > The benefit is not so much for normal operations, but it'll give us >

Re: [PATCHv2 09/14] libata: fixup ZAC device disabling

2016-04-14 Thread Tejun Heo
On Thu, Apr 14, 2016 at 07:48:03AM +0200, Hannes Reinecke wrote: > On 04/13/2016 08:09 PM, Tejun Heo wrote: > > On Tue, Apr 12, 2016 at 08:47:53AM +0200, Hannes Reinecke wrote: > >> libata device disabling is ... curious. So add the correct > >> definitions that we can d

Re: [PATCHv2 05/14] libata: NCQ Encapsulation for READ LOG DMA EXT

2016-04-14 Thread Tejun Heo
On Thu, Apr 14, 2016 at 05:59:48PM +0200, Hannes Reinecke wrote: > For this patch, yes, you are right. > However, the ZAC enablement patches later on submit READ LOG EXT commands > (for REPORT ZONES), and _they_ benefit from NCQ encapsulation. Umm... so, you can't use ata_exec_internal() outside o

Re: [PATCHv3 00/14] libata: ZAC support

2016-04-25 Thread Tejun Heo
Hello, On Mon, Apr 25, 2016 at 12:45:42PM +0200, Hannes Reinecke wrote: > here's a patchset implementing ZAC support for libata. > > This is the second part of a larger patchset for ZAC/ZBC support; > it requires the scsi trace fixes queued for in mkp/4.7/scsi-queue and > the patchset 'libata: SA

Re: [PATCHv3 00/14] libata: ZAC support

2016-05-09 Thread Tejun Heo
On Fri, May 06, 2016 at 01:05:36PM +0200, Hannes Reinecke wrote: > On 04/25/2016 10:16 PM, Tejun Heo wrote: > > Hello, > > > > On Mon, Apr 25, 2016 at 12:45:42PM +0200, Hannes Reinecke wrote: > >> here's a patchset implementing ZAC support for libata. > >&

Converting ipr to use ata_port_operations->error_handler

2016-05-25 Thread Tejun Heo
Hello, Brian. So, of all the ata drivers, ipr seems to be the only driver which doesn't implement ata_port_opeations->error_handler and thus depends on the old error handling path. I'm wondering whether it'd be possible to convert ipr to implement ->error_handler and drop the old path. Would that

  1   2   3   4   5   6   7   8   >