<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/xen/tmem.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-04-14T23:49:03Z</updated>
<entry>
<title>cleancache: forbid overriding cleancache_ops</title>
<updated>2015-04-14T23:49:03Z</updated>
<author>
<name>Vladimir Davydov</name>
</author>
<published>2015-04-14T22:46:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53d85c98566535d7bc69470f008d7dcb09a0fec9'/>
<id>urn:sha1:53d85c98566535d7bc69470f008d7dcb09a0fec9</id>
<content type='text'>
Currently, cleancache_register_ops returns the previous value of
cleancache_ops to allow chaining.  However, chaining, as it is
implemented now, is extremely dangerous due to possible pool id
collisions.  Suppose, a new cleancache driver is registered after the
previous one assigned an id to a super block.  If the new driver assigns
the same id to another super block, which is perfectly possible, we will
have two different filesystems using the same id.  No matter if the new
driver implements chaining or not, we are likely to get data corruption
with such a configuration eventually.

This patch therefore disables the ability to override cleancache_ops
altogether as potentially dangerous.  If there is already cleancache
driver registered, all further calls to cleancache_register_ops will
return EBUSY.  Since no user of cleancache implements chaining, we only
need to make minor changes to the code outside the cleancache core.

Signed-off-by: Vladimir Davydov &lt;vdavydov@parallels.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Stefan Hengelein &lt;ilendir@googlemail.com&gt;
Cc: Florian Schmaus &lt;fschmaus@gmail.com&gt;
Cc: Andor Daam &lt;andor.daam@googlemail.com&gt;
Cc: Dan Magenheimer &lt;dan.magenheimer@oracle.com&gt;
Cc: Bob Liu &lt;lliubbo@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>xen/tmem: mark xen_tmem_init() __init</title>
<updated>2015-01-23T11:55:24Z</updated>
<author>
<name>Jan Beulich</name>
</author>
<published>2015-01-23T08:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=144c61ad355a4f31a45a2cd91c808020c4322374'/>
<id>urn:sha1:144c61ad355a4f31a45a2cd91c808020c4322374</id>
<content type='text'>
As a module_init() function, this should have been this way from the
beginning.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'stable/for-linus-3.11-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen</title>
<updated>2013-07-03T20:12:42Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-07-03T20:12:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e34131a65127e73fbae68c82748f32c8af7e4a4'/>
<id>urn:sha1:3e34131a65127e73fbae68c82748f32c8af7e4a4</id>
<content type='text'>
Pull Xen bugfixes from Konrad Rzeszutek Wilk:
 - Fix memory leak when CPU hotplugging.
 - Compile bugs with various #ifdefs
 - Fix state changes in Xen PCI front not dealing well with new
   toolstack.
 - Cleanups in code (use pr_*, fix 80 characters splits, etc)
 - Long standing bug in double-reporting the steal time

* tag 'stable/for-linus-3.11-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/time: remove blocked time accounting from xen "clockchip"
  xen: Convert printks to pr_&lt;level&gt;
  xen: ifdef CONFIG_HIBERNATE_CALLBACKS xen_*_suspend
  xen/pcifront: Deal with toolstack missing 'XenbusStateClosing' state.
  xen/time: Free onlined per-cpu data structure if we want to online it again.
  xen/time: Check that the per_cpu data structure has data before freeing.
  xen/time: Don't leak interrupt name when offlining.
  xen/time: Encapsulate the struct clock_event_device in another structure.
  xen/spinlock: Don't leak interrupt name when offlining.
  xen/smp: Don't leak interrupt name when offlining.
  xen/smp: Set the per-cpu IRQ number to a valid default.
  xen/smp: Introduce a common structure to contain the IRQ name and interrupt line.
  xen/smp: Coalesce the free_irq calls in one function.
  xen-pciback: fix error return code in pcistub_irq_handler_switch()
</content>
</entry>
<entry>
<title>xen: Convert printks to pr_&lt;level&gt;</title>
<updated>2013-06-28T15:19:58Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2013-06-28T10:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=283c0972d53769ee44750cad4c27e3f5fa26ec1f'/>
<id>urn:sha1:283c0972d53769ee44750cad4c27e3f5fa26ec1f</id>
<content type='text'>
Convert printks to pr_&lt;level&gt; (excludes printk(KERN_DEBUG...)
to be more consistent throughout the xen subsystem.

Add pr_fmt with KBUILD_MODNAME or "xen:" KBUILD_MODNAME
Coalesce formats and add missing word spaces
Add missing newlines
Align arguments and reflow to 80 columns
Remove DRV_NAME from formats as pr_fmt adds the same content

This does change some of the prefixes of these messages
but it also does make them more consistent.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/tmem: Don't over-write tmem_frontswap_poolid after tmem_frontswap_init set it.</title>
<updated>2013-06-10T14:14:33Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2013-06-07T19:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2c75c446ae72387916e2caf6e6dca815b6e5e6e'/>
<id>urn:sha1:b2c75c446ae72387916e2caf6e6dca815b6e5e6e</id>
<content type='text'>
Commit 10a7a0771399a57a297fca9615450dbb3f88081a ("xen: tmem: enable Xen
tmem shim to be built/loaded as a module") allows the tmem module
to be loaded any time. For this work the frontswap API had to
be able to asynchronously to call tmem_frontswap_init before
or after the swap image had been set. That was added in git
commit 905cd0e1bf9ffe82d6906a01fd974ea0f70be97a
("mm: frontswap: lazy initialization to allow tmem backends to build/run as modules").

Which means we could do this (The common case):

 modprobe tmem		[so calls frontswap_register_ops, no -&gt;init]
			 modifies tmem_frontswap_poolid = -1
 swapon /dev/xvda1	[__frontswap_init, calls -&gt; init, tmem_frontswap_poolid is
			 &lt; 0 so tmem hypercall done]

Or the failing one:

 swapon /dev/xvda1	[calls __frontswap_init, sets the need_init bitmap]
 modprobe tmem		[calls frontswap_register_ops, --&gt;init calls, finds out
			tmem_frontswap_poolid is 0, does not make a hypercall.
			Later in the module_init, sets tmem_frontswap_poolid=-1]

Which meant that in the failing case we would not call the hypercall
to initialize the pool and never be able to make any frontswap
backend calls.

Moving the frontswap_register_ops after setting the tmem_frontswap_poolid
fixes it.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Bob Liu &lt;bob.liu@oracle.com&gt;
</content>
</entry>
<entry>
<title>xmem/tmem: fix 'undefined variable' build error.</title>
<updated>2013-05-28T13:54:48Z</updated>
<author>
<name>Frederico Cadete</name>
</author>
<published>2013-05-25T20:48:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d7004f0593f631b78745e4c835d8e09b31f4996'/>
<id>urn:sha1:1d7004f0593f631b78745e4c835d8e09b31f4996</id>
<content type='text'>
In the (not so useful) kernel configuration where CONFIG_SWAP
is undefined and CONFIG_XEN_SELFBALLOONING is defined,
xen_tmem_init would use undefined variable 'static bool frontswap'.

Added #else to have #define frontswap (0) in the case where
CONFIG_FRONTSWAP is not defined.

Signed-off-by: Frederico Cadete &lt;frederico@cadete.eu&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/tmem: Don't use self[ballooning|shrinking] if frontswap is off.</title>
<updated>2013-05-15T14:27:50Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2013-05-14T17:56:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37d46e152e4c71cd772085912f1c7bf06839f739'/>
<id>urn:sha1:37d46e152e4c71cd772085912f1c7bf06839f739</id>
<content type='text'>
There is no point. We would just squeeze the guest to put more and
more pages in the swap disk without any purpose.

The only time it makes sense to use the selfballooning and shrinking
is when frontswap is being utilized.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/tmem: Remove the boot options and fold them in the tmem.X parameters.</title>
<updated>2013-05-15T14:27:47Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2013-05-08T21:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ca62b044457e3aacaa06684974b0ff40b2f5a94'/>
<id>urn:sha1:2ca62b044457e3aacaa06684974b0ff40b2f5a94</id>
<content type='text'>
If tmem is built-in or a module, the user has the option on
the command line to influence it by doing: tmem.&lt;some option&gt;
instead of having a variety of "nocleancache", and
"nofrontswap". The others: "noselfballooning" and "selfballooning";
and "noselfshrink" are in a different driver xen-selfballoon.c
and the patches:

 xen/tmem: Remove the usage of 'noselfshrink' and use 'tmem.selfshrink' bool instead.
 xen/tmem: Remove the usage of 'noselfballoon','selfballoon' and use 'tmem.selfballon' bool instead.

remove them.

Also add documentation.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/tmem: s/disable_// and change the logic.</title>
<updated>2013-05-15T14:27:46Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2013-05-08T21:10:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9fd19653faceef210f30901f7cee0ceb13c6f39a'/>
<id>urn:sha1:9fd19653faceef210f30901f7cee0ceb13c6f39a</id>
<content type='text'>
The variety of disable_[cleancache|frontswap|selfshrinking] are
making this a bit complex. Just remove the "disable_" part and
change the logic around for the "nofrontswap" and "nocleancache"
parameters.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/tmem: Fix compile warning.</title>
<updated>2013-05-15T14:27:45Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
</author>
<published>2013-05-08T20:57:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23972c639980ba796a05ae9432df8267175b99ae'/>
<id>urn:sha1:23972c639980ba796a05ae9432df8267175b99ae</id>
<content type='text'>
We keep on getting:
drivers/xen/tmem.c:65:13: warning: ‘disable_frontswap_selfshrinking’ defined but not used [-Wunused-variable]

if CONFIG_FRONTSWAP=y and # CONFIG_CLEANCACHE is not set

Found by 0 day test project

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
</feed>
