lkml.org 
[lkml]   [2011]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 06/12] mmc: mmc_test: test to measure how sg_len affect performance
From
On 28 June 2011 10:11, Per Forlin <per.forlin@linaro.org> wrote:
> test that measures how the mmc bandwidth depends on the numbers of sg elements
> in the sg list. The transfer size if fixed and sg length goes from a few up
> to 512. The purpose is to measure overhead caused by multiple sg elements.
>
> Signed-off-by: Per Forlin <per.forlin@linaro.org>
> ---
>  drivers/mmc/card/mmc_test.c |  151 +++++++++++++++++++++++++++++++++++++++----
>  1 files changed, 139 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
> -static int mmc_test_map_sg(struct mmc_test_mem *mem, unsigned long sz,
> +static int mmc_test_map_sg(struct mmc_test_mem *mem, unsigned long size,
>                           struct scatterlist *sglist, int repeat,
>                           unsigned int max_segs, unsigned int max_seg_sz,
> -                          unsigned int *sg_len)
> +                          unsigned int *sg_len, int min_sg_len)
>  {
>        struct scatterlist *sg = NULL;
>        unsigned int i;
> +       unsigned long sz = size;
>
>        sg_init_table(sglist, max_segs);
> +       if (min_sg_len > max_segs)
> +               min_sg_len = max_segs;
>
>        *sg_len = 0;
>        do {
>                for (i = 0; i < mem->cnt; i++) {
>                        unsigned long len = PAGE_SIZE << mem->arr[i].order;
>
> +                       if (min_sg_len && (size / min_sg_len < len))
> +                               len = size / min_sg_len;
Make aligned to 512
len = ALIGN(size / min_sg_len, 512);

I run into this issue running on arm realview with max test size 128k
instead of 128M.

/Per
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-07-01 15:35    [W:0.919 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site