2020-07-27 19:01:30

by Vaibhav Gupta

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

The patch is compile-tested only.

Thanks
Vaibhav Gupta


2020-07-27 19:04:08

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
> The patch is compile-tested only.

Please test and verify actual functionality, if you're serious about
potentially getting this into the kernel.

--
Jens Axboe

2020-07-27 19:05:27

by Vaibhav Gupta

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On Mon, Jul 27, 2020 at 11:42:51AM -0600, Jens Axboe wrote:
> On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
> > The patch is compile-tested only.
>
> Please test and verify actual functionality, if you're serious about
> potentially getting this into the kernel.
>
Hello Jens,

Sadly I don't have the hardware. This upgrade is part of my Linux Kernel
Mentorship Program project. Like other PCI drivers which I have updated, I could
do compile-testing only. Though this patch covers 54 drivers but the actual
change is done only in drivers/ata/libata-core. Since rest of the drivers
make use of the same ata_pci_device_suspend/resume(), it was a chain reaction. I
only had to change variable binding in "struct pci_driver" variable of dependent
drivers.

Thanks
Vaibhav Gupta
> --
> Jens Axboe
>

2020-07-27 19:08:13

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On 7/27/20 11:51 AM, Vaibhav Gupta wrote:
> On Mon, Jul 27, 2020 at 11:42:51AM -0600, Jens Axboe wrote:
>> On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
>>> The patch is compile-tested only.
>>
>> Please test and verify actual functionality, if you're serious about
>> potentially getting this into the kernel.
>>
> Hello Jens,
>
> Sadly I don't have the hardware. This upgrade is part of my Linux Kernel
> Mentorship Program project. Like other PCI drivers which I have updated, I could
> do compile-testing only. Though this patch covers 54 drivers but the actual
> change is done only in drivers/ata/libata-core. Since rest of the drivers
> make use of the same ata_pci_device_suspend/resume(), it was a chain reaction. I
> only had to change variable binding in "struct pci_driver" variable of dependent
> drivers.

That's understandable, but you should find at least some hardware (maybe remotely
accessible) to test this on. I'm not going to apply this without some confidence
that it actually works, and compile only testing is a far cry from that. Lots of
code compiles, but fails miserably at runtime.

While it's touching 54 drivers, at least basic coverage of the most popular
choices will give everybody some confidence that it works in general.

--
Jens Axboe

2020-07-27 19:11:34

by Vaibhav Gupta

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On Mon, Jul 27, 2020 at 11:59:05AM -0600, Jens Axboe wrote:
> On 7/27/20 11:51 AM, Vaibhav Gupta wrote:
> > On Mon, Jul 27, 2020 at 11:42:51AM -0600, Jens Axboe wrote:
> >> On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
> >>> The patch is compile-tested only.
> >>
> >> Please test and verify actual functionality, if you're serious about
> >> potentially getting this into the kernel.
> >>
> > Hello Jens,
> >
> > Sadly I don't have the hardware. This upgrade is part of my Linux Kernel
> > Mentorship Program project. Like other PCI drivers which I have updated, I could
> > do compile-testing only. Though this patch covers 54 drivers but the actual
> > change is done only in drivers/ata/libata-core. Since rest of the drivers
> > make use of the same ata_pci_device_suspend/resume(), it was a chain reaction. I
> > only had to change variable binding in "struct pci_driver" variable of dependent
> > drivers.
>
> That's understandable, but you should find at least some hardware (maybe remotely
> accessible) to test this on. I'm not going to apply this without some confidence
> that it actually works, and compile only testing is a far cry from that. Lots of
> code compiles, but fails miserably at runtime.
>
> While it's touching 54 drivers, at least basic coverage of the most popular
> choices will give everybody some confidence that it works in general.
>
Yes, I agree. Actually with previous drivers, I was able to get help from
maintainers and/or supporters for the hardware testing. Is that possible for
this patch?

Thanks
Vaibhav Gupta
> --
> Jens Axboe
>

2020-07-27 20:32:34

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On 7/27/20 12:11 PM, Vaibhav Gupta wrote:
> On Mon, Jul 27, 2020 at 11:59:05AM -0600, Jens Axboe wrote:
>> On 7/27/20 11:51 AM, Vaibhav Gupta wrote:
>>> On Mon, Jul 27, 2020 at 11:42:51AM -0600, Jens Axboe wrote:
>>>> On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
>>>>> The patch is compile-tested only.
>>>>
>>>> Please test and verify actual functionality, if you're serious
>>>> about potentially getting this into the kernel.
>>>>
>>> Hello Jens,
>>>
>>> Sadly I don't have the hardware. This upgrade is part of my Linux
>>> Kernel Mentorship Program project. Like other PCI drivers which I
>>> have updated, I could do compile-testing only. Though this patch
>>> covers 54 drivers but the actual change is done only in
>>> drivers/ata/libata-core. Since rest of the drivers make use of the
>>> same ata_pci_device_suspend/resume(), it was a chain reaction. I
>>> only had to change variable binding in "struct pci_driver" variable
>>> of dependent drivers.
>>
>> That's understandable, but you should find at least some hardware
>> (maybe remotely accessible) to test this on. I'm not going to apply
>> this without some confidence that it actually works, and compile only
>> testing is a far cry from that. Lots of code compiles, but fails
>> miserably at runtime.
>>
>> While it's touching 54 drivers, at least basic coverage of the most
>> popular choices will give everybody some confidence that it works in
>> general.
>>
> Yes, I agree. Actually with previous drivers, I was able to get help
> from maintainers and/or supporters for the hardware testing. Is that
> possible for this patch?

It might be, you'll have to ask people to help you, very rarely do people
just test patches unsolicited unless they have some sort of interest in the
feature.

This is all part of what it takes to get code upstream. Writing the code
is just a small part of it, the bigger part is usually getting it tested
and providing some assurance that you are willing to fix issues when/if
they come up.

You might want to consider splitting up the patchset a bit - you could
have one patch for the generic bits, then one for each chipset. That
would allow you to at least get some of the work upstream, once tested.

--
Jens Axboe

2020-07-28 05:19:53

by Vaibhav Gupta

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On Mon, Jul 27, 2020 at 02:30:03PM -0600, Jens Axboe wrote:
> On 7/27/20 12:11 PM, Vaibhav Gupta wrote:
> > On Mon, Jul 27, 2020 at 11:59:05AM -0600, Jens Axboe wrote:
> >> On 7/27/20 11:51 AM, Vaibhav Gupta wrote:
> >>> On Mon, Jul 27, 2020 at 11:42:51AM -0600, Jens Axboe wrote:
> >>>> On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
> > Yes, I agree. Actually with previous drivers, I was able to get help
> > from maintainers and/or supporters for the hardware testing. Is that
> > possible for this patch?
>
> It might be, you'll have to ask people to help you, very rarely do people
> just test patches unsolicited unless they have some sort of interest in the
> feature.
>
> This is all part of what it takes to get code upstream. Writing the code
> is just a small part of it, the bigger part is usually getting it tested
> and providing some assurance that you are willing to fix issues when/if
> they come up.
>
> You might want to consider splitting up the patchset a bit - you could
> have one patch for the generic bits, then one for each chipset. That
> would allow you to at least get some of the work upstream, once tested.
>
I think I can break this patch into one commit per driver. The reason that
all updates got into one single patch is that I made
ata_pci_device_suspend/resume() static and exported just the
ata_pci_device_pm_ops variable. Thus, all the driver using .suspend/.resume()
had to be updated in a single patch.

First I will make changes in drivers/ata/libata-core.c, but won't make any
function static. Thus, each driver can be updated in independent commits
without breaking anything. And then in the last commit, I can hide the
unnecessary .suspend()/.resume() callbacks. This will create patch-series of 55
or 56 patches.

Will this approach work?

Thanks
Vaibhav Gupta
> --
> Jens Axboe
>

2020-07-28 15:52:56

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH v2] ata: use generic power management

On 7/27/20 11:17 PM, Vaibhav Gupta wrote:
> On Mon, Jul 27, 2020 at 02:30:03PM -0600, Jens Axboe wrote:
>> On 7/27/20 12:11 PM, Vaibhav Gupta wrote:
>>> On Mon, Jul 27, 2020 at 11:59:05AM -0600, Jens Axboe wrote:
>>>> On 7/27/20 11:51 AM, Vaibhav Gupta wrote:
>>>>> On Mon, Jul 27, 2020 at 11:42:51AM -0600, Jens Axboe wrote:
>>>>>> On 7/27/20 11:40 AM, Vaibhav Gupta wrote:
>>> Yes, I agree. Actually with previous drivers, I was able to get help
>>> from maintainers and/or supporters for the hardware testing. Is that
>>> possible for this patch?
>>
>> It might be, you'll have to ask people to help you, very rarely do people
>> just test patches unsolicited unless they have some sort of interest in the
>> feature.
>>
>> This is all part of what it takes to get code upstream. Writing the code
>> is just a small part of it, the bigger part is usually getting it tested
>> and providing some assurance that you are willing to fix issues when/if
>> they come up.
>>
>> You might want to consider splitting up the patchset a bit - you could
>> have one patch for the generic bits, then one for each chipset. That
>> would allow you to at least get some of the work upstream, once tested.
>>
> I think I can break this patch into one commit per driver. The reason that
> all updates got into one single patch is that I made
> ata_pci_device_suspend/resume() static and exported just the
> ata_pci_device_pm_ops variable. Thus, all the driver using .suspend/.resume()
> had to be updated in a single patch.
>
> First I will make changes in drivers/ata/libata-core.c, but won't make any
> function static. Thus, each driver can be updated in independent commits
> without breaking anything. And then in the last commit, I can hide the
> unnecessary .suspend()/.resume() callbacks. This will create patch-series of 55
> or 56 patches.
>
> Will this approach work?

That should work, but more importantly, ensure you get some folks signed up
for testing this functionality.

--
Jens Axboe