Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Mike Frysinger
On Monday, August 22, 2011 17:48:47 Anton Staaf wrote: On Mon, Aug 22, 2011 at 2:42 PM, Wolfgang Denk wrote: Anton Staaf wrote: Currently, if a device read request is done that does not begin or end on a sector boundary a stack allocated bounce buffer is used to perform the read, and then

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 10:23 AM, Mike Frysinger vap...@gentoo.org wrote: On Monday, August 22, 2011 17:48:47 Anton Staaf wrote: On Mon, Aug 22, 2011 at 2:42 PM, Wolfgang Denk wrote: Anton Staaf wrote: Currently, if a device read request is done that does not begin or end on a sector

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 13:58:01 Anton Staaf wrote: On Tue, Aug 23, 2011 at 10:23 AM, Mike Frysinger wrote: On Monday, August 22, 2011 17:48:47 Anton Staaf wrote: On Mon, Aug 22, 2011 at 2:42 PM, Wolfgang Denk wrote: Anton Staaf wrote: Currently, if a device read request is done

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Wolfgang Denk
Dear Anton Staaf, In message CAF6FioXyMnhK=gkbwdegpvggz-xms-hr6c4q3ssttj29crs...@mail.gmail.com you wrote: This patch allocates a cache line size aligned sector sized bounce buffer the first time that ext2fs_devread is called. ...and never frees ist, which is a bad thing. =A0Please fix.

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 14:39:48 Wolfgang Denk wrote: Anton Staaf wrote: This patch allocates a cache line size aligned sector sized bounce buffer the first time that ext2fs_devread is called. ...and never frees ist, which is a bad thing. =A0Please fix. That was actually

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 11:32 AM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday, August 23, 2011 13:58:01 Anton Staaf wrote: On Tue, Aug 23, 2011 at 10:23 AM, Mike Frysinger wrote: On Monday, August 22, 2011 17:48:47 Anton Staaf wrote: On Mon, Aug 22, 2011 at 2:42 PM, Wolfgang Denk

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 11:47 AM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday, August 23, 2011 14:39:48 Wolfgang Denk wrote: Anton Staaf wrote: This patch allocates a cache line size aligned sector sized bounce buffer the first time that ext2fs_devread is called. ...and never

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 14:48:24 Anton Staaf wrote: On Tue, Aug 23, 2011 at 11:32 AM, Mike Frysinger wrote: and what do you do when there is no memory left in the malloc arena because you leaked it all and so can't service any new read requests ? I think you've miss-understood my

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 11:55 AM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday, August 23, 2011 14:48:24 Anton Staaf wrote: On Tue, Aug 23, 2011 at 11:32 AM, Mike Frysinger wrote: and what do you do when there is no memory left in the malloc arena because you leaked it all and so can't

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Wolfgang Denk
Dear Mike Frysinger, In message 201108231447.39934.vap...@gentoo.org you wrote: then people would simply do: DMA_DECLARE_BUFFER(char, sec_buf, SECTOR_SIZE); but i'm not sure this is better than the proposed: char *sec_buf = dma_buffer_alloca(SECTOR_SIZE); i'd have to look at

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Wolfgang Denk
Dear Anton Staaf, In message caf6fiouorx50_6nekmc0myakf6rzwsbu9tonrc+4c2uwuh+...@mail.gmail.com you wrote: and what do you do when there is no memory left in the malloc arena because you leaked it all and so can't service any new read requests ? I think you've miss-understood my patch.

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 1:18 PM, Wolfgang Denk w...@denx.de wrote: Dear Anton Staaf, In message caf6fiouorx50_6nekmc0myakf6rzwsbu9tonrc+4c2uwuh+...@mail.gmail.com you wrote: and what do you do when there is no memory left in the malloc arena because you leaked it all and so can't

[U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-22 Thread Anton Staaf
Currently, if a device read request is done that does not begin or end on a sector boundary a stack allocated bounce buffer is used to perform the read, and then just the part of the sector that is needed is copied into the users buffer. This stack allocation can mean that the bounce buffer will

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-22 Thread Wolfgang Denk
Dear Anton Staaf, In message 1314043924-22130-1-git-send-email-robot...@chromium.org you wrote: Currently, if a device read request is done that does not begin or end on a sector boundary a stack allocated bounce buffer is used to perform the read, and then just the part of the sector that is

Re: [U-Boot] [PATCH v2] ext2: Cache line aligned partial sector bounce buffer

2011-08-22 Thread Anton Staaf
On Mon, Aug 22, 2011 at 2:42 PM, Wolfgang Denk w...@denx.de wrote: Dear Anton Staaf, In message 1314043924-22130-1-git-send-email-robot...@chromium.org you wrote: Currently, if a device read request is done that does not begin or end on a sector boundary a stack allocated bounce buffer is