> -----Original Message-----
> From: Jaegeuk Kim [mailto:[email protected]]
> Sent: Tuesday, September 23, 2014 12:53 PM
> To: [email protected]; [email protected];
> [email protected]
> Cc: Jaegeuk Kim
> Subject: [f2fs-dev] [PATCH 2/3] f2fs: introduce FITRIM in f2fs_ioctl
> 
> This patch introduces FITRIM in f2fs_ioctl.
> In this case, f2fs will issue small discards and prefree discards as many as
> possible for the given area.
> 
> Signed-off-by: Jaegeuk Kim <[email protected]>

Looks good!

Reviewed-by: Chao Yu <[email protected]>

> +
>       /* zero block will be discarded through the prefree list */
>       if (!se->valid_blocks || se->valid_blocks == max_blocks)
>               return;
> 
> +     dmap = kzalloc(SIT_VBLOCK_MAP_SIZE, GFP_KERNEL);

We can afford 64 bytes allocation in stack, how about altering dmap to a local
array to reduce memory pressure at that moment and avoid delay of allocation?

> +     if (!dmap)
> +             return;
> +


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

Reply via email to