Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocated scatterlist if the pre-allocated one
isn't enough for the whole request.
Signed-off-by: Min
From: Finn Thain
My understanding is that support for chained scatterlists is to
become mandatory for LLDs.
Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocate
Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocated scatterlist if the pre-allocated one
isn't enough for the whole request.
Signed-off-by: Min
Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocated scatterlist if the pre-allocated one
isn't enough for the whole request.
Signed-off-by: Min
Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocated scatterlist if the pre-allocated one
isn't enough for the whole request.
Signed-off-by: Min
place SCp.buffers_residual with sg_is_last()
for fixing updating it, and the similar change has been applied on
NCR5380.c
Cc: Finn Thain
Signed-off-by: Ming Lei
---
drivers/scsi/aha152x.c | 42 --
1 file changed, 20 insertions(+), 22 deletions(-)
diff --
jamin Block
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: linux-s...@vger.kernel.org
Acked-by: Benjamin Block
Signed-off-by: Ming Lei
---
drivers/s390/scsi/zfcp_fc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
c: de...@driverdev.osuosl.org
Cc: Greg Kroah-Hartman
Signed-off-by: Ming Lei
---
drivers/staging/rts5208/rtsx_transport.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rts5208/rtsx_transport.c
b/drivers/staging/rts5208/rtsx_transport.c
index 8277d7895608..407c907
rg
Cc: Greg Kroah-Hartman
Acked-by: Greg Kroah-Hartman
Signed-off-by: Ming Lei
---
drivers/staging/unisys/visorhba/visorhba_main.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c
b/drivers/staging/unisys/vis
Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocated scatterlist if the pre-allocated one
isn't enough for the whole request.
Signed-off-by: Min
Use the scatterlist iterators and remove direct indexing of the
scatterlist array.
This way allows us to pre-allocate one small scatterlist, which can be
chained with one runtime allocated scatterlist if the pre-allocated one
isn't enough for the whole request.
Signed-off-by: Min
Kroah-Hartman
Cc: linux-usb@vger.kernel.org
Signed-off-by: Ming Lei
---
drivers/usb/image/microtek.c | 20
drivers/usb/image/microtek.h | 2 +-
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
igned-off-by: Ming Lei
---
drivers/scsi/advansys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index d37584403c33..b87de8d3d844 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -7714,7 +7
igned-off-by: Ming Lei
---
drivers/scsi/vmw_pvscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index ecee4b3ff073..d71abd416eb4 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -335,7 +
igned-off-by: Ming Lei
---
drivers/scsi/lpfc/lpfc_nvmet.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index f3d9a5545164..3f803982bd1e 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi
igned-off-by: Ming Lei
---
drivers/scsi/mvumi.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index a5410615edac..0022cd31500a 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -211,8 +211,7 @@ stati
of words are from
James Bottomley
V2:
- use coccinelle semantic patch for finding direct sgl uses from
scsi command(9 drivers found)
- run 'git grep -E "SCp.buffer"' to find direct sgl uses
from SCp.buffer(6 drivers are found)
Finn Thain (1
On Fri, Jun 14, 2019 at 08:36:38PM +1000, Finn Thain wrote:
> On Fri, 14 Jun 2019, Ming Lei wrote:
>
> >
> > Follows the fixed version, could you review again?
> >
> > From f03484d4bac083c39d70665cfbadb641093b63de Mon Sep 17 00:00:00 2001
> > From: Ming Lei
lash drive.
If it is true, this particular issue might be addressed simply by applying one
quirk on this drive, such as, by adding one delay before calling
sd_spinup_disk()
in the 1st sd_revalidate_disk() to wait until it is ready to process
I/O requests.
Otherwise if there are many such devices, I think your approach is good.
Thanks,
Ming Lei
On Tue, Sep 16, 2014 at 7:16 AM, Paul Zimmerman
wrote:
>> From: dingu...@opensource.altera.com [mailto:dingu...@opensource.altera.com]
>> Sent: Monday, September 15, 2014 8:23 AM
>>
>> Hi Ming-Lei,
>>
>> Thanks for your patch to enable the URB giveback in a ta
On Mon, Sep 15, 2014 at 11:22 PM, wrote:
> From: Dinh Nguyen
>
> Hi Ming-Lei,
>
> Thanks for your patch to enable the URB giveback in a tasklet context for
> the EHCI driver. I found your patch to fix a USB webcam timeout/stutter
> issue on the DWC2 HCD in the SOCFPGA pla
On Wed, Mar 19, 2014 at 11:05 PM, vichy wrote:
> hi Ming:
One approach I like to use is trace event.
>>> Would you please let us how to to use trace event for calculate
>>> max/average usb irq time?
>>
>> You can enable irq_handler_entry and irq_handler_exit event, then
>> write a script easi
I said, spin_lock() isn't converted to spin_lock_irqsave()
in drivers' completion handler yet
- maybe no one really care the time in which local interrupt is
disabled by USB completion handler.(That might be true
because USB devices are commonly used in personal
computer, not in bi
ndler in BH,
isn't that what you need?
But actually the local interrupt is still disabled during completion
because we need to convert spin_lock in all current usb drivers
to spin_lock_irqsave() first.
I posted lot of patches to do the conversion, but unfortunately
most of them aren't m
storage too since the single URB in the middle of
transfer produces short packet.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
So when this SS storage device(maxp isn't 512) comes and block layer
may send scatter-gather list with an non-tail entry that isn't aligned
to the max packet size, looks xHCD has to enable no_sg_constraint
and has to deal with it correctly, and I am wondering if there is other
s broken, so it looks
> like we'll have to revert the last patch to add scatter-gather to the
> ASIX driver to avoid that breakage. That means Mathias is going to need
> to revert those two commits then, since he's taking over pushing xHCI
> driver bug fixes this ke
On Sat, Feb 1, 2014 at 9:30 PM, Mark Lord wrote:
> On 14-02-01 02:54 AM, Ming Lei wrote:
> ..
>> With SG enabled, for the iperf client test case, the average urb size
>> for transmission will be increased from ~1500 to ~20K bytes in my
>> test case:
>>
>>
On Sat, Feb 1, 2014 at 3:00 AM, Sarah Sharp
wrote:
> On Fri, Jan 31, 2014 at 08:17:58AM +0800, Ming Lei wrote:
>> On Fri, Jan 31, 2014 at 6:15 AM, Sarah Sharp
>> wrote:
>> > On Thu, Jan 30, 2014 at 10:50:21PM +0100, Bjørn Mork wrote:
>> >> FWIW, the plan loo
ce improvement introduced in 3.12.
>>
>> No other usbnet drivers has enabled SG... Which is why you have only
>> seen this problem with the ax88179_178a devices. So there is no
>> performance improvement to keep.
In my test environment, the patch does improve both throughput and
cpu utilization, if you search the previous email for the patch, you can
see the data.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
or the usb3 and 'normal' ethernet interfaces.
>
> While each bit doesn't seem significant, they soon add up.
If you plan to remove the 'nents' parameter, I am wondering if it is
a good idea, because sg_nents() should be more heavy. Not mention
sometimes the callers just w
On Sat, Jan 11, 2014 at 5:16 PM, Ming Lei wrote:
> On Sat, Jan 11, 2014 at 6:10 AM, Bjørn Mork wrote:
>> Commit 60e453a940ac ("USBNET: fix handling padding packet")
>> added an extra SG entry in case padding is necessary, but
>> failed to update the initialisation
ff the end of the list,
> resulting in an oops.
>
> Fixes: 60e453a940ac ("USBNET: fix handling padding packet")
> Reported-by: Thomas Kear
> Cc: Ming Lei
> Signed-off-by: Bjørn Mork
> ---
> I don't have the hardware to verify this fix. It would be good if
> someon
y: Stephen Rothwell
Signed-off-by: Ming Lei
---
drivers/usb/storage/protocol.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c
index f54e5fe..12e3c2f 100644
--- a/drivers/usb/storage/protocol.c
+++ b/drivers/u
On Tue, Dec 10, 2013 at 1:05 PM, Greg Kroah-Hartman
wrote:
> On Tue, Dec 10, 2013 at 12:37:24PM +0800, Ming Lei wrote:
>> This patch should fix the below compile warning:
>>
>> drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf':
>>
This patch should fix the below compile warning:
drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf':
drivers/usb/storage/protocol.c:155:22: warning: comparison of distinct
pointer types lacks a cast [enabled by default]
Reported-by: kbuild test robot
Reported-by: Stephen Roth
On Sat, Nov 30, 2013 at 6:23 AM, Tejun Heo wrote:
> On Tue, Nov 26, 2013 at 12:43:37PM +0800, Ming Lei wrote:
>> sg_copy_buffer() can't meet demand for some drrivers(such usb
>> mass storage), so we have to use the sg_miter_* APIs to access
>> sg buffer, then need export
ed-by: Andrew Morton
Cc: FUJITA Tomonori
Cc: Tejun Heo
Cc: Jens Axboe
Signed-off-by: Ming Lei
---
include/linux/scatterlist.h |1 +
lib/scatterlist.c |3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/scatterlist.h b/include/linux/scatterl
On Fri, Nov 1, 2013 at 10:54 PM, Alan Stern wrote:
> On Wed, 30 Oct 2013, Ming Lei wrote:
>
>> We have sg_miter_* APIs for accessing scsi sg buffer, so
>> use them to make code clean and bug free.
>
> Hmmm. You could simply call sg_copy_buffer, if you didn't mind th
ing & commenting on 2/2 and merge
the two finally to usb-next tree if you are OK with it?
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We have sg_miter_* APIs for accessing scsi sg buffer, so
use them to make code clean and bug free.
Cc: Matthew Dharm
Cc: Alan Stern
Cc: Greg Kroah-Hartman
Signed-off-by: Ming Lei
---
drivers/usb/storage/protocol.c | 82 ++--
1 file changed, 28 insertions
.
Cc: Andrew Morton ,
Cc: FUJITA Tomonori ,
Cc: Tejun Heo ,
Cc: Jens Axboe
Signed-off-by: Ming Lei
---
include/linux/scatterlist.h |1 +
lib/scatterlist.c |3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
tire usb storage"? Aren't they the same thing?
>
>> Or maybe scsi has
>> decided to abort so it should override the result.
>
> Of course the SCSI midlayer has decided to abort. That's the only way
> this bit can get set. But usb-storage doesn't know why S
esult
is replaced with DID_TIME_OUT now.
Another way is to implement .eh_timed_out callback to return different
error for the two failure, but looks not a big deal.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
iscussions first before post your V2.
Below link is one I remembered, but I think you can find more:
https://lkml.org/lkml/2013/8/11/100
> This is all dependent on what the dev.id is of udev.
I am not sure why it depends on udev, and udev can't
see the device util it is added to system.
Th
ode.
>
> I will need to post V2 for that.
Your patch still doesn't deal with two smsc95xx devices built in
one board.
The problem is a generic one, looks it is better to do it when OF supports
discoverable bus.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "
On Mon, Oct 7, 2013 at 1:31 AM, Dan Murphy wrote:
> On 10/06/2013 10:05 AM, Ming Lei wrote:
>> On Sat, Oct 5, 2013 at 2:25 AM, Dan Murphy wrote:
>>> If the smsc95xx does not have a valid MAC address stored within
>>> the eeprom then a random number is generated. The
ot;MAC address read from
> DTB\n");
> + return;
> + }
> + }
> +#endif
> +
> /* try reading mac address from EEPROM */
> if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
> dev->net-
On Sat, Oct 5, 2013 at 11:10 PM, Alan Stern wrote:
> On Sat, 5 Oct 2013, Ming Lei wrote:
>
>> > The buffer should be cached. The userspace program will have to make
>> > sure that it doesn't try to access the buffer while DMA is in progress.
>> > As long
if the memory is already almost full? The call to
> alloc_pages_exact() could fail.
>
> I agree this is less likely than a failure with the current system, but
> it is still possible.
With CONFIG_COMPACTION enabled, it is hard to trigger the
allocation failure, and actually on some ARCHs, size of
gt; BULK
Why do you want to override SG transfer?
> * adding pgprot_noncached to ensure that the IO memory is not cached
Accessing non-cached mapping on some ARCHs is extremely slow, so I
an wondering if it is good way to map the area as non-cached.
Thanks,
--
Ming Lei
--
To unsubscr
On Sun, Sep 29, 2013 at 8:18 PM, Markus Rechberger
wrote:
> On Sun, Sep 29, 2013 at 2:07 PM, Ming Lei wrote:
>> On Sun, Sep 29, 2013 at 7:51 PM, Markus Rechberger
>> wrote:
>>
>>>
>>> I agree, but here not only small buffers are the problem, also lat
od:
- URB can only be submitted in process context with context switch cost
- URB complete is notified by signal, which might introduce much latency
With one kernel mode driver, you can get better performance/latency much
easily.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the lin
er usb mass storage block device.
>
> This may depend more on the host controller capabilities than on the
> CPU architecture.
Yes, but for most cases, more than 4GB ram is seldom used in 32bit CPU.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscrib
On Sat, Sep 28, 2013 at 10:29 AM, Alan Stern wrote:
> On Sat, 28 Sep 2013, Ming Lei wrote:
>
>> On Wed, Sep 25, 2013 at 3:12 AM, Markus Rechberger
>> wrote:
>> > This patch adds memory mapping support to USBFS for isochronous and bulk
>> > data transfers, it
ated to user space directly), which should be more flexible, and
user don't need to use mmap/munmap, so should be easier to use.
At least, wrt. usb mass storage test, both CPU utilization and throughput
can be improved with direct I/O.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: sen
On Mon, Sep 23, 2013 at 8:59 PM, Ming Lei wrote:
> Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG
> if the usb host controller is capable of building packet from
> discontinuous buffers, but missed handling padding packet when
> building DMA SG.
>
> This pat
packet can be sent to device
if drivers require that.
Reported-by: David Laight
Acked-by: Oliver Neukum
Signed-off-by: Ming Lei
---
v1:
- fix bug in case of dev->can_dma_sg and !urb->num_sgs
---
drivers/net/usb/usbnet.c | 27 +--
include/linux/usb/us
here is application
which is using the device by 'lsof | grep "/dev/video"'.
Also looks power usage estimation of 'power top' should be used
when battery provides power, and the data isn't correct if power is
provided from power adapter, if I remember correctly.
devices' drivers converted to sg.
>
> I wonder what the gain of that really is? Yes, I can see the advantage
> of making the class drivers more effective. But padding is only
> relevant for the ECM class, isn't it? And are there any ECM class
> devices where SG support mat
On Wed, Sep 18, 2013 at 11:52 PM, Bjørn Mork wrote:
> Ming Lei writes:
>
>>> Are you really sure that the one driver/device using this really need
>>> the padding byte? If you could just make FLAG_SEND_ZLP part of the
>>> condition for enabling can_dma_sg, the
On Wed, Sep 18, 2013 at 9:59 PM, Bjørn Mork wrote:
> Ming Lei writes:
>
>> Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG
>> if the usb host controller is capable of building packet from
>> discontinuous buffers, but missed handling padding packet
packet can be sent to device
if drivers require that.
Reported-by: David Laight
Cc: Oliver Neukum
Signed-off-by: Ming Lei
---
drivers/net/usb/usbnet.c | 27 +--
include/linux/usb/usbnet.h |1 +
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers
On Mon, Sep 16, 2013 at 4:13 PM, Oliver Neukum wrote:
> On Thu, 2013-09-12 at 09:56 +0800, Ming Lei wrote:
>> On Thu, Sep 12, 2013 at 12:05 AM, David Laight
>> wrote:
>
>> Patches are always welcome, :-)
>
> Indeed, I think your patch, if no better alternatives c
ded correctly (the code probably falls off
>> >> > >the end of the scatter-gather list).
>> >> >
>> >> > Indeed. Ming Lei, should usbnet handle this in the sg case or better
>> >> > leave it to the subdriver you introduced thi
On Wed, Sep 11, 2013 at 8:56 PM, David Laight wrote:
>> > > 2) If 'length % dev->maxpacket == 0' for a multi-fragment packet then
>> > >the extra byte isn't added correctly (the code probably falls off
>> > >the end of the scatter-g
On Tue, Aug 27, 2013 at 10:39 PM, Alan Stern wrote:
> On Tue, 27 Aug 2013, Ming Lei wrote:
>
>> > Yes. A new spinlock would be needed to synchronize the top half and
>> > the bottom half. The same spinlock would also be used to avoid
>> > scheduling the tasklet
On Thu, Aug 29, 2013 at 12:05 AM, Alan Stern wrote:
> On Wed, 28 Aug 2013, Ming Lei wrote:
>
>> > Think about it this way: Why did you write the "USB: EHCI: improve
>> > interrupt qh unlink" patch in the first place? Essentially the same
>> > reason
bout to scan
> again; they mustn't get scanned until the frame pointer has wrapped
> around.
>
> This last problem in particular means your proposal can't be accepted.
On Thu, Aug 29, 2013 at 8:43 AM, Ming Lei wrote:
> No, no other TDs scheduled for the frames since the queu
On Thu, Aug 29, 2013 at 12:23 AM, Alan Stern wrote:
> On Wed, 28 Aug 2013, Ming Lei wrote:
>
>> Below is the approach I proposed(mentioned in another thread), which should
>> be
>> simper than this one, any comments?
>>
>>
unsignedlast_base; /* previous 'last_iso_frame' */
unsignedlast_iso_frame; /* last frame scanned for iso */
unsignedintr_count; /* intr activity count */
unsignedisoc_count; /* isoc activity count */
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Aug 28, 2013 at 12:24 PM, Ming Lei wrote:
> On Wed, 28 Aug 2013 12:02:03 +0800
> Ming Lei wrote:
>
>> Actually the problem only happened when underrun without
>> URB_ISO_ASAP.
>>
>> I have another fix which uses rebase trick and is simper(less cha
On Wed, 28 Aug 2013 12:02:03 +0800
Ming Lei wrote:
> Actually the problem only happened when underrun without
> URB_ISO_ASAP.
>
> I have another fix which uses rebase trick and is simper(less change), could
> you comment on the attachment patch?
Sorry, please ignore last attach
On Tue, Aug 27, 2013 at 10:55 PM, Alan Stern wrote:
> On Tue, 27 Aug 2013, Ming Lei wrote:
>
>> > I don't understand your argument. The uhci-hcd _does_ support
>> > interrupt URBs being submitted from tasklets, workqueues, kernel
>> > threads, or whatever
On Tue, Aug 27, 2013 at 4:05 AM, Alan Stern wrote:
> On Mon, 26 Aug 2013, Ming Lei wrote:
>
>> > The problem is that once an interrupt QH has been unlinked, relinking
>> > it might not make it visible to the hardware until the next frame
>> > starts. Ther
On Mon, Aug 26, 2013 at 11:29 PM, Alan Stern wrote:
> On Mon, 26 Aug 2013, Ming Lei wrote:
>
>> > On Sat, 24 Aug 2013, Ming Lei wrote:
>> >
>> >> But the current interrupt from EHCI isn't be acked(USBSTS isn't cleared),
>> >> so EHCI HW
On Sun, Aug 25, 2013 at 11:39 PM, Alan Stern wrote:
> On Sat, 24 Aug 2013, Ming Lei wrote:
>
>> >> >> For other HCDs, this changes on interrupt QH unlink may not need at all
>> >> >> if there is no much cost about relink.
>> >> >
>&g
I will respond to the points you
> raised in your review.
OK, I will ask Greg to put back the patch 'USB: EHCI: disable
IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled'
into his tree.
>
> On Sat, 24 Aug 2013, Ming Lei wrote:
>
>> But the current in
On Fri, Aug 23, 2013 at 11:40 PM, Alan Stern wrote:
> On Fri, 23 Aug 2013, Ming Lei wrote:
>
>> On Fri, Aug 23, 2013 at 4:36 AM, Alan Stern
>> wrote:
>> > On Thu, 22 Aug 2013, Ming Lei wrote:
>> >
>> >> > This seems to be the most important fac
On Sat, Aug 24, 2013 at 12:06 AM, Alan Stern wrote:
> On Fri, 23 Aug 2013, Ming Lei wrote:
>
>> On Fri, Aug 23, 2013 at 4:39 AM, Alan Stern
>> wrote:
>> > This patch divides ehci-hcd's interrupt handler into a top half and a
>> > bottom half, using a tas
On Fri, Aug 23, 2013 at 4:39 AM, Alan Stern wrote:
> This patch divides ehci-hcd's interrupt handler into a top half and a
> bottom half, using a tasklet to execute the latter.
>
> The conversion is very straightforward. The only subtle point is that
> we have to ignore interrupts that arrive whi
On Fri, Aug 23, 2013 at 4:36 AM, Alan Stern wrote:
> On Thu, 22 Aug 2013, Ming Lei wrote:
>
>> > This seems to be the most important factor. When you think about it,
>> > though, does it really minimize the changes? Consider all the other
>> > adjustment
On Sun, Aug 18, 2013 at 12:24 AM, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
>
> Cc: Marcel Holtmann
> Cc: Gustavo Padovan
> Cc: Johan Hedberg
> Cc: linux-blueto...@vger.kernel.org
> Signed-off-by: Ming Lei
M
On Sun, Aug 18, 2013 at 12:24 AM, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
>
> Cc: Jiri Kosina
> Cc: linux-in...@vger.kernel.org
> Signed-off-by: Ming Lei
Jiri, could you review and give an Ack?
Thanks,
--
Ming Lei
On Thu, Aug 22, 2013 at 4:58 PM, Ming Lei wrote:
> On Wed, Aug 21, 2013 at 11:23 PM, Alan Stern
> wrote:
>> I'm starting to think that moving the entire handler to a tasklet would
>> have been better.
>
> Not sure, if so:
>
> - one thing is that the HCD priv
On Wed, Aug 21, 2013 at 11:23 PM, Alan Stern wrote:
> On Wed, 21 Aug 2013, Ming Lei wrote:
>
>> > By the way, even though it's a little late to ask this... Why did you
>> > decide to move only the giveback routine into a tasklet, instead of
>> > moving the
, so moving complete() to tasklet can help to
decrease HCD irq handling time.
Also moving only the giveback routine into a tasklet can avoid dropping
HCD private lock during irq handler, which may simplify HCD code, and
I have figured out ehci cleanup patches for this.
Thanks,
--
Ming Lei
--
expirations/sec
(20% ~ 30% of totoal timer expirations/sec) can be saved when one asix
network NIC is connected to EHCI without network traffic(the device
responds interrupt poll 7~8 times per second constantly for link status
query).
Cc: Alan Stern
Signed-off-by: Ming Lei
---
drivers/usb/host/ehci
On Tue, Aug 20, 2013 at 12:01 AM, Mark Brown wrote:
> On Mon, Aug 19, 2013 at 08:17:53PM +0800, Ming Lei wrote:
>> On Sat, Aug 17, 2013 at 9:29 AM, Alan Stern
>> wrote:
>
>> > Aong those lines, I would like to point out that the device concept
>> > embodied
t comes.
> What does this help with? Measurements please.
The patch may avoid unnecessary CPU wakeups caused by
timer expiration, and measurement is provided below.
On Mon, Aug 19, 2013 at 11:30 PM, Alan Stern wrote:
> On Mon, 19 Aug 2013, Ming Lei wrote:
>
>> This patch introduces
On Mon, Aug 19, 2013 at 11:33 PM, Alan Stern wrote:
> On Mon, 19 Aug 2013, Ming Lei wrote:
>
>> > As far as I can see, this counter does not need to be exact. Why not
>> > simply make it a non-atomic unsigned int?
>>
>> It may becomes quite inaccurate, and 4
On Mon, Aug 19, 2013 at 11:14 PM, Greg Kroah-Hartman
wrote:
> On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote:
>> On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman
>> wrote:
>> > On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote:
>> >>
On Mon, Aug 19, 2013 at 11:17 PM, Alan Stern wrote:
> On Mon, 19 Aug 2013, Ming Lei wrote:
>
>> On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern
>> wrote:
>> > On Mon, 19 Aug 2013, Ming Lei wrote:
>> >
>> >> Because usb_hcd_submit_urb is in the hote
On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern wrote:
> On Mon, 19 Aug 2013, Ming Lei wrote:
>
>> Because usb_hcd_submit_urb is in the hotest path of usb core,
>> so use percpu counter to count URB instead of using atomic variable
>> because atomic operations are much slowe
On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman
wrote:
> On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote:
>> Because usb_hcd_submit_urb is in the hotest path of usb core,
>> so use percpu counter to count URB instead of using atomic variable
>> because atomi
, I think it's time to try to implement something rather than talk
>> about it.
>
> Hopefully this discussion has given you some ideas for alternative
> approachs, or at least helped to solidify your ideas.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ng the
flag is still kept as atomic but ARCH's atomic operations(atomic_inc/
atomic_dec) are saved.
Cc: Oliver Neukum
Cc: Alan Stern
Signed-off-by: Ming Lei
---
drivers/usb/core/hcd.c | 14 +-
drivers/usb/core/urb.c |8 ++--
drivers/usb/core/usb.h |5 +
include/li
This patch introduces ehci_disable_event(), which is applied on
IAA_WATCHDOG and START_UNLINK_INTR events in case that the two
events needn't to be handled, so that we may avoid unnecessary CPU
wakeup.
Cc: Alan Stern
Signed-off-by: Ming Lei
---
drivers/usb/host/ehci-hcd.c |
Because usb_hcd_submit_urb is in the hotest path of usb core,
so use percpu counter to count URB instead of using atomic variable
because atomic operations are much slower than percpu operations.
Cc: Oliver Neukum
Cc: Alan Stern
Signed-off-by: Ming Lei
---
drivers/usb/core/hcd.c |4
On Sun, Aug 18, 2013 at 10:44 PM, Alan Stern wrote:
> On Sun, 18 Aug 2013, Ming Lei wrote:
>
>> > As far as I can see, these don't need to disable interrupts. All they
>> > protect against is the code in usb_sg_wait() and usb_sg_cancel(), which
>> >
1 - 100 of 879 matches
Mail list logo