[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTilc3XVXFgNHf3gBTwjamO7cR6bO6ZBTw_j8DECq@mail.gmail.com>
Date: Mon, 17 May 2010 21:01:51 +0900
From: Minchan Kim <minchan.kim@...il.com>
To: Nitin Gupta <ngupta@...are.org>
Cc: Greg KH <greg@...ah.com>, Pekka Enberg <penberg@...helsinki.fi>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Nigel Cunningham <nigel@...onice.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hugh.dickins@...cali.co.uk>,
Cyp <cyp561@...il.com>, driverdev <devel@...verdev.osuosl.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] Add swap slot free callback to block_device_operations
On Mon, May 17, 2010 at 2:32 PM, Nitin Gupta <ngupta@...are.org> wrote:
> This callback is required when RAM based devices are used as swap disks.
> One such device is ramzswap which is used as compressed in-memory swap
> disk. For such devices, we need a callback as soon as a swap slot is no
> longer used to allow freeing memory allocated for this slot. Without this
> callback, stale data can quickly accumulate in memory defeating the whole
> purpose of such devices.
>
> Signed-off-by: Nitin Gupta <ngupta@...are.org>
Reviewed-by: Minchan Kim <minchan.kim@...il.com>
Looks good to me about code. so I added my review sign.
But I have some comments.
last time I said, I don't like there is a swap specific function in
block_device_operations.
It doesn't need many memory but it's not good about design sine
block_device_operations have common functions about block device.
But I don't have any good idea now where I put swap specific function.
And Linus already acked this idea. Hmm.
If there isn't any objection, I don't insist on my thought.
Nitpick :
AFAIR, Nitin introduced SWP_BLKDEV since he think access of long
pointers isn't good. ex)
S_ISBLK(swap_info_struct->swap_file->f_mapping->host->i_mode)
But now, we have to access p->bdev->bd_disk->fops->swap_slot_free_notify.
Isn't it all right?
--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists