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]
Message-Id: <1157368883.5078.24.camel@localhost>
Date:	Mon, 04 Sep 2006 13:21:23 +0200
From:	Martin Schwidefsky <schwidefsky@...ibm.com>
To:	Dave Hansen <haveblue@...ibm.com>
Cc:	Andy Whitcroft <apw@...dowen.org>, linux-kernel@...r.kernel.org,
	virtualization@...ts.osdl.org, akpm@...l.org,
	nickpiggin@...oo.com.au, frankeh@...son.ibm.com
Subject: Re: [patch 3/9] Guest page hinting: volatile page cache.

On Fri, 2006-09-01 at 11:41 -0700, Dave Hansen wrote:
> While something like the following wouldn't be scalable, it would
> functionally work, right?
> 
> +static void __page_discard(struct page *page)
> +{
> +       spin_lock(discard_lock);
> ...
> +       spin_unlock(discard_lock);
> +}
> 
> +void __delete_from_swap_cache(struct page *page)
> +{
> +       spin_lock(discard_lock);
> ...
> +       spin_unlock(discard_lock);
> +}
> 
> +void __remove_from_page_cache(struct page *page)
> +{
> +       spin_lock(discard_lock);
> ...
> +       spin_unlock(discard_lock);
> +}

Any kind of locking won't work. You need the information that a page has
been discarded until the page has been freed. Only then the fact that
the page has been discarded may enter nirvana. Any kind of lock needs to
be freed again to allow the next discard fault to happen. Since you
don't when the last page reference is returned you cannot hold the lock
until the page is free.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.



-- 
VGER BF report: H 0
-
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