lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 May 2010 09:22:50 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Nitin Gupta <ngupta@...are.org>
cc:	Greg KH <greg@...ah.com>, Minchan Kim <minchan.kim@...il.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	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 0/3] ramzswap: Eliminate stale data in compressed
 memory



On Wed, 5 May 2010, Nitin Gupta wrote:
> 
> I think such 'swap_operations' structure will be have to be part of
> block_device_operations, so we may access it from swap_entry_free()
> where a swap slot is freed. This will also get rid of all this notifier
> stuff.

Yes, I think adding it to block_device_operations would be fine. That 
sounds like a sane layering, and would make it easy for a block device 
driver to say "I want to know about swap events".

In fact, for regular block devices, a swap block free might well translate 
into a TRIM command some day (where "some day" means when the SSD's 
actually get their stuff together and there is real upside and not just 
"most cases will be very slow and the upside is debatable").

> The patch you nacked did something similar: it add 'swap_slot_free_callback'
> directly to block_device_operations. Without such change, I could not think
> of any way to do away with notifiers.

Umm. No. IIRC, the patch I NAK'ed aded it to the 'swap_info_struct', which 
I said was the wrong level. The block device driver level would seem to be 
the _right_ level, since that's what ramzswap is. No?

Also, the patch I NAK'ed also used those nasty notifier chains, making it 
even uglier.

				Linus
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ