RE: [RFC] USB: gadget: f_mass_storage: limit page cache usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Friday, January 28, 2011 7:07 PM Rajaram R wrote:

> On Fri, Jan 28, 2011 at 9:33 PM, Marek Szyprowski
> <m.szyprowski@xxxxxxxxxxx> wrote:
> > Hello,
> >
> > On Friday, January 28, 2011 4:31 PM Alan Stern wrote:
> >
> >> On Fri, 28 Jan 2011, Marek Szyprowski wrote:
> >>
> >> > This commit add code that flushed page cache disk buffers every 128 read
> >> > and write request. It has almost no impact on the performance of the
> >> > emulate usb drive but saves system page cache from being filled with
> >> > useless emulated disk data.
> 
> Could you also pls confirm the impact of this change on the
> performance of the mass storage device?

I've 2 series of tests: 
1. copying about 1.5GB of small files to vfat partition
2. dd'ing one large (1GB) file directly to /dev/sdb.

Before patch (average):
1. copying: 445s 
2. copying: 125s

After patch (average):
1. copying: 580s
2. copying: 188s

The impact on the performance of the usb drive is noticeable. That's why this hack
should be made optional or configurable. The main reason for a speed reduction is
the fact that the pages are being written synchronously while processing host
requests. I'm looking for a method for triggering mass storage page cache flush
and invalidate that will be asynchronous.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux