Discussion:
[linux-mm-cc] Is swap notify in 2.6.34?
Clemens Eisserer
2010-05-21 19:44:12 UTC
Permalink
Hi,

First of all a big thank you work working on compcache!
Is sawp notify support already in 2.6.34, or if not, is integration
into mainline planned?

Thanks again, Clemens
John McCabe-Dansted
2010-05-22 05:05:56 UTC
Permalink
Post by Clemens Eisserer
First of all a big thank you work working on compcache!
Is sawp notify support already in 2.6.34
Apparently not:
http://www.mail-archive.com/linux-mm-cc at lists.laptop.org/msg00177.html
Post by Clemens Eisserer
, or if not, is integration
into mainline planned?
Yes, Nitin Gupta has recently resubmitted the patches
http://lkml.org/lkml/2010/5/7/54

Now Torvalds seems to be happy :)
http://lkml.org/lkml/2010/5/7/224

OT: There was some discussions of the stats ioctl
http://lkml.org/lkml/2010/5/8/11
I found the old /proc/rzstats type interface more useful myself.
Currently I need to do a sudo just to read some stats. I could set up
some SUID binary to do this for me but I am not sure why the old
/proc/ interface was replaced.
--
John C. McCabe-Dansted
Nitin Gupta
2010-05-22 07:01:07 UTC
Permalink
Post by John McCabe-Dansted
Post by Clemens Eisserer
First of all a big thank you work working on compcache!
Is sawp notify support already in 2.6.34
http://www.mail-archive.com/linux-mm-cc at lists.laptop.org/msg00177.html
Post by Clemens Eisserer
, or if not, is integration
into mainline planned?
Yes, Nitin Gupta has recently resubmitted the patches
http://lkml.org/lkml/2010/5/7/54
Now Torvalds seems to be happy :)
http://lkml.org/lkml/2010/5/7/224
Its now in mainline. So, it will be part of 2.6.35 :)
Post by John McCabe-Dansted
OT: There was some discussions of the stats ioctl
http://lkml.org/lkml/2010/5/8/11
I found the old /proc/rzstats type interface more useful myself.
Currently I need to do a sudo just to read some stats. I could set up
some SUID binary to do this for me but I am not sure why the old
/proc/ interface was replaced.
I'm now planning to export stats through /sys interface.

Also, I've changes under testing that allow ramzswap devices to be used
for *any* purpose, not just for swap. So, you could now say create ext4
filesystem over these devices and mount it as /tmp. Considering generic
nature of these devices, now they will be renamed as /dev/zramX (X = 1, 2 ...).


Thanks,
Nitin
Clemens Eisserer
2010-05-22 08:07:01 UTC
Permalink
Hi Nitiin,
Post by Nitin Gupta
Its now in mainline. So, it will be part of 2.6.35 :)
That is really great news, looking foreward to update Fedora-13 one day ;)

Thanks again, Clemens
John McCabe-Dansted
2010-05-31 03:32:05 UTC
Permalink
Post by Nitin Gupta
Post by Clemens Eisserer
First of all a big thank you work working on compcache!
Is sawp notify support already in 2.6.34
...
Post by Nitin Gupta
Its now in mainline. So, it will be part of 2.6.35 :)
Weird I have updated to the latest kernel but I cannot find
swap_slot_free_notify in swap.h.

$ git pull
Already up-to-date.
$ grep url .git/config
url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
$ grep notify include/linux/swap.h
$

Am I looking in the "wrong" mainline?
--
John C. McCabe-Dansted
Nitin Gupta
2010-05-31 04:09:26 UTC
Permalink
Post by John McCabe-Dansted
Post by Nitin Gupta
Post by Clemens Eisserer
First of all a big thank you work working on compcache!
Is sawp notify support already in 2.6.34
...
Post by Nitin Gupta
Its now in mainline. So, it will be part of 2.6.35 :)
Weird I have updated to the latest kernel but I cannot find
swap_slot_free_notify in swap.h.
$ git pull
Already up-to-date.
$ grep url .git/config
url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
$ grep notify include/linux/swap.h
$
Am I looking in the "wrong" mainline?
You are looking at the right tree but the wrong file.
Changes are in include/linux/blkdev.h, mm/swapfile.c
and ramzswap_drv.c. See these three commits:

(git show <commit_no>)

commit b27256439568950f30864ccecaeb6dfb588089d5
swap: Add flag to identify block swap devices

commit b3a27d0529c6e5206f1b60f60263e3ecfd0d77cb
swap: Add swap slot free callback to block_device_operations

commit 107c161b7ddeeb7da43509cc6b29211885ccd9af
Staging: ramzswap: Handler for swap slot free callback

Thanks,
Nitin

Continue reading on narkive:
Loading...