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: <D949F1A1ED65354FA281790D817657A4A4BF33CC83@seldmbx01.corpusers.net>
Date:	Mon, 15 Apr 2013 15:38:08 +0200
From:	"Dolkow, Snild" <Snild.Dolkow@...ymobile.com>
To:	'Dan Carpenter' <dan.carpenter@...cle.com>,
	"Anderö, Oskar" 
	<Oskar.Andero@...ymobile.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Lekanovic, Radovan" <Radovan.Lekanovic@...ymobile.com>,
	Brian Swetland <swetland@...gle.com>
Subject: RE: [PATCH] lowmemorykiller: prevent multiple instances of low
 memory killer

>Where is lowmem_shrink called from?  I only see shrink called from the
>bcache sysfs handler __bch_cache_set().  The return value isn't checked
>there.
>
>Up to now this function has only returns positive numbers.
>
>There isn't a place which check LMK_BUSY so maybe it's best to just
>return zero?

Hey Dan,

lowmem_shrink is assigned to a shrinker struct (include/linux/shrinker.h) and called in do_shrinker_shrink() in mm/vmscan.c. That, in turn, is called and checked in a few places in vmscan.c.
	
>From the comments in shrinker.h: 
"It should return the number of objects which remain in the cache. If it returns -1, it means it cannot do any scanning at this time (eg. there is a risk of deadlock). The callback must not return -1 if nr_to_scan is zero."

//Snild
--
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