* [PATCH] [mmotm v2] comment on swap notify locking constraints
@ 2010-01-14 18:10 Nitin Gupta
2010-01-14 18:50 ` Hugh Dickins
0 siblings, 1 reply; 2+ messages in thread
From: Nitin Gupta @ 2010-01-14 18:10 UTC (permalink / raw)
To: Hugh Dickins, Pekka Enberg
Cc: Andrew Morton, Al Viro, Christoph Hellwig, Jens Axboe,
Andi Kleen, linux-kernel
A block device makes swap_slot_free_notify() callback
when the last reference to a swap slot is dropped.
This callback is made under swap_lock and page table
lock. This is a note of warning for registered callback
function which must meet these constraints.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
---
include/linux/blkdev.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f86df8b..fb7b3c2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1294,6 +1294,7 @@ struct block_device_operations {
unsigned long long);
int (*revalidate_disk) (struct gendisk *);
int (*getgeo)(struct block_device *, struct hd_geometry *);
+ /* this callback is with swap_lock and page table lock held */
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
struct module *owner;
};
--
1.6.2.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [mmotm v2] comment on swap notify locking constraints
2010-01-14 18:10 [PATCH] [mmotm v2] comment on swap notify locking constraints Nitin Gupta
@ 2010-01-14 18:50 ` Hugh Dickins
0 siblings, 0 replies; 2+ messages in thread
From: Hugh Dickins @ 2010-01-14 18:50 UTC (permalink / raw)
To: Nitin Gupta
Cc: Pekka Enberg, Andrew Morton, Al Viro, Christoph Hellwig,
Jens Axboe, Andi Kleen, linux-kernel
From: Nitin Gupta <ngupta@vflare.org>
A block device makes swap_slot_free_notify() callback
when the last reference to a swap slot is dropped.
This callback is made under swap_lock and sometimes page table
lock. This is a note of warning for registered callback
function which must meet these constraints.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
---
I've added "sometimes " in the comment above and the comment below:
sorry, I should have made that clearer when I made this point.
Hugh
include/linux/blkdev.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f86df8b..fb7b3c2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1294,6 +1294,7 @@ struct block_device_operations {
unsigned long long);
int (*revalidate_disk) (struct gendisk *);
int (*getgeo)(struct block_device *, struct hd_geometry *);
+ /* this callback is with swap_lock and sometimes page table lock held */
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
struct module *owner;
};
--
1.6.2.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-14 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-14 18:10 [PATCH] [mmotm v2] comment on swap notify locking constraints Nitin Gupta
2010-01-14 18:50 ` Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®