<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/mm/highmem.c, branch linux-2.6.32.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-11-10T03:15:47Z</updated>
<entry>
<title>highmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE</title>
<updated>2009-11-10T03:15:47Z</updated>
<author>
<name>Soeren Sandmann</name>
</author>
<published>2009-10-28T17:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4515646699b6ad7b1a98ceb871296b957f3ef47'/>
<id>urn:sha1:d4515646699b6ad7b1a98ceb871296b957f3ef47</id>
<content type='text'>
Previously calling debug_kmap_atomic() with these types would
cause spurious warnings.

(triggered by SysProf using perf events)

Signed-off-by: Soeren Sandmann Pedersen &lt;sandmann@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: a.p.zijlstra@chello.nl
Cc: &lt;stable@kernel.org&gt; # .31.x
LKML-Reference: &lt;ye8vdhz8krw.fsf@camel23.daimi.au.dk&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow</title>
<updated>2009-11-10T03:15:32Z</updated>
<author>
<name>Soeren Sandmann</name>
</author>
<published>2009-10-28T17:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ebd4c22897dce65845807a9bd3a31cc4e142b53'/>
<id>urn:sha1:5ebd4c22897dce65845807a9bd3a31cc4e142b53</id>
<content type='text'>
debug_kmap_atomic() tries to prevent ever printing more than 10
warnings, but it does so by testing whether an unsigned integer
is equal to 0. However, if the warning is caused by a nested
IRQ, then this counter may underflow and the stream of warnings
will never end.

Fix that by using a signed integer instead.

Signed-off-by: Soeren Sandmann Pedersen &lt;sandmann@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: a.p.zijlstra@chello.nl
Cc: &lt;stable@kernel.org&gt; # .31.x
LKML-Reference: &lt;ye8zl7b8ktj.fsf@camel23.daimi.au.dk&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>block: remove some includings of blktrace_api.h</title>
<updated>2009-06-16T09:19:36Z</updated>
<author>
<name>Li Zefan</name>
</author>
<published>2009-06-16T09:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e212d6f25084e8e9b02a04ba514d7bb1e4a4924a'/>
<id>urn:sha1:e212d6f25084e8e9b02a04ba514d7bb1e4a4924a</id>
<content type='text'>
When porting blktrace to tracepoints, we changed to trace/block.h
for trace prober declarations.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>mm: introduce debug_kmap_atomic</title>
<updated>2009-04-01T15:59:14Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2009-03-31T22:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4112de6b679d84bd9b9681c7504be7bdfb7c7d5'/>
<id>urn:sha1:f4112de6b679d84bd9b9681c7504be7bdfb7c7d5</id>
<content type='text'>
x86 has debug_kmap_atomic_prot() which is error checking function for
kmap_atomic.  It is usefull for the other architectures, although it needs
CONFIG_TRACE_IRQFLAGS_SUPPORT.

This patch exposes it to the other architectures.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: &lt;linux-arch@vger.kernel.org&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>highmem: atomic highmem kmap page pinning</title>
<updated>2009-03-16T01:01:21Z</updated>
<author>
<name>Nicolas Pitre</name>
</author>
<published>2009-03-05T03:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3297e760776af18a26bf30046cbaaae2e730c5c2'/>
<id>urn:sha1:3297e760776af18a26bf30046cbaaae2e730c5c2</id>
<content type='text'>
Most ARM machines have a non IO coherent cache, meaning that the
dma_map_*() set of functions must clean and/or invalidate the affected
memory manually before DMA occurs.  And because the majority of those
machines have a VIVT cache, the cache maintenance operations must be
performed using virtual
addresses.

When a highmem page is kunmap'd, its mapping (and cache) remains in place
in case it is kmap'd again. However if dma_map_page() is then called with
such a page, some cache maintenance on the remaining mapping must be
performed. In that case, page_address(page) is non null and we can use
that to synchronize the cache.

It is unlikely but still possible for kmap() to race and recycle the
virtual address obtained above, and use it for another page before some
on-going cache invalidation loop in dma_map_page() is done. In that case,
the new mapping could end up with dirty cache lines for another page,
and the unsuspecting cache invalidation loop in dma_map_page() might
simply discard those dirty cache lines resulting in data loss.

For example, let's consider this sequence of events:

	- dma_map_page(..., DMA_FROM_DEVICE) is called on a highmem page.

	--&gt;	- vaddr = page_address(page) is non null. In this case
		it is likely that the page has valid cache lines
		associated with vaddr. Remember that the cache is VIVT.

		--&gt;	for (i = vaddr; i &lt; vaddr + PAGE_SIZE; i += 32)
				invalidate_cache_line(i);

	*** preemption occurs in the middle of the loop above ***

	- kmap_high() is called for a different page.

	--&gt;	- last_pkmap_nr wraps to zero and flush_all_zero_pkmaps()
		  is called.  The pkmap_count value for the page passed
		  to dma_map_page() above happens to be 1, so the page
		  is unmapped.  But prior to that, flush_cache_kmaps()
		  cleared the cache for it.  So far so good.

		- A fresh pkmap entry is assigned for this kmap request.
		  The Murphy law says this pkmap entry will eventually
		  happen to use the same vaddr as the one which used to
		  belong to the other page being processed by
		  dma_map_page() in the preempted thread above.

	- The kmap_high() caller start dirtying the cache using the
	  just assigned virtual mapping for its page.

	*** the first thread is rescheduled ***

			- The for(...) loop is resumed, but now cached
			  data belonging to a different physical page is
			  being discarded !

And this is not only a preemption issue as ARM can be SMP as well,
making the above scenario just as likely. Hence the need for some kind
of pkmap page pinning which can be used in any context, primarily for
the benefit of dma_map_page() on ARM.

This provides the necessary interface to cope with the above issue if
ARCH_NEEDS_KMAP_HIGH_GET is defined, otherwise the resulting code is
unchanged.

Signed-off-by: Nicolas Pitre &lt;nico@marvell.com&gt;
Reviewed-by: MinChan Kim &lt;minchan.kim@gmail.com&gt;
Acked-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86, pat: avoid highmem cache attribute aliasing</title>
<updated>2008-08-15T15:22:57Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2008-08-01T01:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5843d9a4d0ba89719916c8f07fc9c57b7126be6d'/>
<id>urn:sha1:5843d9a4d0ba89719916c8f07fc9c57b7126be6d</id>
<content type='text'>
Highmem code can leave ptes and tlb entries around for a given page even after
kunmap, and after it has been freed.

&gt;From what I can gather, the PAT code may change the cache attributes of
arbitrary physical addresses (ie. including highmem pages), which would result
in aliases in the case that it operates on one of these lazy tlb highmem
pages.

Flushing kmaps should solve the problem.

I've also just added code for conditional flushing if we haven't got
any dangling highmem aliases -- this should help performance if we
change page attributes frequently or systems that aren't using much
highmem pages (eg. if &lt; 4G RAM). Should be turned into 2 patches, but
just for RFC...

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>highmem: Export totalhigh_pages.</title>
<updated>2008-07-20T05:39:46Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-07-20T05:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db7a94d60f871ce6a52e97d82dea476cee0c4ea0'/>
<id>urn:sha1:db7a94d60f871ce6a52e97d82dea476cee0c4ea0</id>
<content type='text'>
Hash et al. sizing code in SCTP wants to make the
calculation totalram_pages - totalhigh_pages, just
like TCP.  But this requires an export for the
CONFIG_HIGHMEM case to work.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mm: highmem kernel-doc additions</title>
<updated>2008-03-20T01:53:35Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2008-03-20T00:00:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77f6078aa8945a18a7780694940e52be0322c2b8'/>
<id>urn:sha1:77f6078aa8945a18a7780694940e52be0322c2b8</id>
<content type='text'>
Add kernel-doc comments to highmem.c.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.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>mm: remove fastcall from mm/</title>
<updated>2008-02-05T17:44:18Z</updated>
<author>
<name>Harvey Harrison</name>
</author>
<published>2008-02-05T06:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=920c7a5d0c94b8ce740f1d76fa06422f2a95a757'/>
<id>urn:sha1:920c7a5d0c94b8ce740f1d76fa06422f2a95a757</id>
<content type='text'>
fastcall is always defined to be empty, remove it

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Harvey Harrison &lt;harvey.harrison@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>Create the ZONE_MOVABLE zone</title>
<updated>2007-07-17T17:22:59Z</updated>
<author>
<name>Mel Gorman</name>
</author>
<published>2007-07-17T11:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a1e274acf0b1c192face19a4be7c12d4503eaaf'/>
<id>urn:sha1:2a1e274acf0b1c192face19a4be7c12d4503eaaf</id>
<content type='text'>
The following 8 patches against 2.6.20-mm2 create a zone called ZONE_MOVABLE
that is only usable by allocations that specify both __GFP_HIGHMEM and
__GFP_MOVABLE.  This has the effect of keeping all non-movable pages within a
single memory partition while allowing movable allocations to be satisfied
from either partition.  The patches may be applied with the list-based
anti-fragmentation patches that groups pages together based on mobility.

The size of the zone is determined by a kernelcore= parameter specified at
boot-time.  This specifies how much memory is usable by non-movable
allocations and the remainder is used for ZONE_MOVABLE.  Any range of pages
within ZONE_MOVABLE can be released by migrating the pages or by reclaiming.

When selecting a zone to take pages from for ZONE_MOVABLE, there are two
things to consider.  First, only memory from the highest populated zone is
used for ZONE_MOVABLE.  On the x86, this is probably going to be ZONE_HIGHMEM
but it would be ZONE_DMA on ppc64 or possibly ZONE_DMA32 on x86_64.  Second,
the amount of memory usable by the kernel will be spread evenly throughout
NUMA nodes where possible.  If the nodes are not of equal size, the amount of
memory usable by the kernel on some nodes may be greater than others.

By default, the zone is not as useful for hugetlb allocations because they are
pinned and non-migratable (currently at least).  A sysctl is provided that
allows huge pages to be allocated from that zone.  This means that the huge
page pool can be resized to the size of ZONE_MOVABLE during the lifetime of
the system assuming that pages are not mlocked.  Despite huge pages being
non-movable, we do not introduce additional external fragmentation of note as
huge pages are always the largest contiguous block we care about.

Credit goes to Andy Whitcroft for catching a large variety of problems during
review of the patches.

This patch creates an additional zone, ZONE_MOVABLE.  This zone is only usable
by allocations which specify both __GFP_HIGHMEM and __GFP_MOVABLE.  Hot-added
memory continues to be placed in their existing destination as there is no
mechanism to redirect them to a specific zone.

[y-goto@jp.fujitsu.com: Fix section mismatch of memory hotplug related code]
[akpm@linux-foundation.org: various fixes]
Signed-off-by: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Cc: William Lee Irwin III &lt;wli@holomorphy.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>
</feed>
