<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel_samsung_smdk4412/mm, branch replicant-6.0</title>
<subtitle>kernel/samsung/smdk4412
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/'/>
<entry>
<title>mm: Disable optimization for function shrink_page_list()</title>
<updated>2019-07-24T10:28:04+00:00</updated>
<author>
<name>Wolfgang Wiedmeyer</name>
<email>wolfgit@wiedmeyer.de</email>
</author>
<published>2016-12-09T17:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=d883c28eac2fc77a4df91678f558ef32d1e4bc0e'/>
<id>d883c28eac2fc77a4df91678f558ef32d1e4bc0e</id>
<content type='text'>
GCC version 5.4.1+svn241155-1 in Debian Stretch has a bug that breaks
the build. The error is attached.
TODO: Gigure out the actual bug or revert patch if a newer GCC is
available in Stretch.

/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c: In function 'shrink_page_list':
/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1019:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 1111 1814 1112 116 (parallel [
            (set (reg/v:SI 3 r3 [orig:111 nr_dirty ] [111])
                (and:SI (ne:SI (reg/v:SI 3 r3 [orig:111 nr_dirty ] [111])
                        (const_int 0 [0]))
                    (eq:SI (reg/v:SI 3 r3 [orig:111 nr_dirty ] [111])
                        (reg/v:SI 2 r2 [orig:112 nr_congested ] [112]))))
            (clobber (reg:CC 100 cc))
        ]) /home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1011 256 {*and_scc_scc_nodom}
     (nil))
/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1019:1: internal compiler error: in extract_constrain_insn, at recog.c:2246

/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1019:1: internal compiler error: Segmentation fault
arm-none-eabi-gcc: internal compiler error: Segmentation fault (program cc1)

Signed-off-by: Wolfgang Wiedmeyer &lt;wolfgit@wiedmeyer.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC version 5.4.1+svn241155-1 in Debian Stretch has a bug that breaks
the build. The error is attached.
TODO: Gigure out the actual bug or revert patch if a newer GCC is
available in Stretch.

/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c: In function 'shrink_page_list':
/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1019:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 1111 1814 1112 116 (parallel [
            (set (reg/v:SI 3 r3 [orig:111 nr_dirty ] [111])
                (and:SI (ne:SI (reg/v:SI 3 r3 [orig:111 nr_dirty ] [111])
                        (const_int 0 [0]))
                    (eq:SI (reg/v:SI 3 r3 [orig:111 nr_dirty ] [111])
                        (reg/v:SI 2 r2 [orig:112 nr_congested ] [112]))))
            (clobber (reg:CC 100 cc))
        ]) /home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1011 256 {*and_scc_scc_nodom}
     (nil))
/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1019:1: internal compiler error: in extract_constrain_insn, at recog.c:2246

/home/wolfi/6.0-romsrc/kernel/samsung/smdk4412/mm/vmscan.c:1019:1: internal compiler error: Segmentation fault
arm-none-eabi-gcc: internal compiler error: Segmentation fault (program cc1)

Signed-off-by: Wolfgang Wiedmeyer &lt;wolfgit@wiedmeyer.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: remove gup_flags FOLL_WRITE games from __get_user_pages()</title>
<updated>2016-10-22T02:35:25+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-19T22:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=6c0837fc69be45a1a1bf91c433ac3a4955597c4e'/>
<id>6c0837fc69be45a1a1bf91c433ac3a4955597c4e</id>
<content type='text'>
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Change-Id: Id9bec3722797dff7d0ff0d9f6097c4229e31fd62
Reported-and-tested-by: Phil "not Paul" Oester &lt;kernel@linuxace.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Nick Piggin &lt;npiggin@gmail.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask;
     s/faultin_page/__get_user_page]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Change-Id: Id9bec3722797dff7d0ff0d9f6097c4229e31fd62
Reported-and-tested-by: Phil "not Paul" Oester &lt;kernel@linuxace.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Nick Piggin &lt;npiggin@gmail.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask;
     s/faultin_page/__get_user_page]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: add a field to store names for private anonymous memory</title>
<updated>2016-08-23T11:55:14+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2015-10-05T14:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=8aa6fa75955db416644e6c9367b350c25cb6745c'/>
<id>8aa6fa75955db416644e6c9367b350c25cb6745c</id>
<content type='text'>
Userspace processes often have multiple allocators that each do
anonymous mmaps to get memory.  When examining memory usage of
individual processes or systems as a whole, it is useful to be
able to break down the various heaps that were allocated by
each layer and examine their size, RSS, and physical memory
usage.

This patch adds a user pointer to the shared union in
vm_area_struct that points to a null terminated string inside
the user process containing a name for the vma.  vmas that
point to the same address will be merged, but vmas that
point to equivalent strings at different addresses will
not be merged.

Userspace can set the name for a region of memory by calling
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name);
Setting the name to NULL clears it.

The names of named anonymous vmas are shown in /proc/pid/maps
as [anon:&lt;name&gt;] and in /proc/pid/smaps in a new "Name" field
that is only present for named vmas.  If the userspace pointer
is no longer valid all or part of the name will be replaced
with "&lt;fault&gt;".

The idea to store a userspace pointer to reduce the complexity
within mm (at the expense of the complexity of reading
/proc/pid/mem) came from Dave Hansen.  This results in no
runtime overhead in the mm subsystem other than comparing
the anon_name pointers when considering vma merging.  The pointer
is stored in a union with fieds that are only used on file-backed
mappings, so it does not increase memory usage.

Change-Id: I53b093d98dc24f41377824f34e076edced4a6f07
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Userspace processes often have multiple allocators that each do
anonymous mmaps to get memory.  When examining memory usage of
individual processes or systems as a whole, it is useful to be
able to break down the various heaps that were allocated by
each layer and examine their size, RSS, and physical memory
usage.

This patch adds a user pointer to the shared union in
vm_area_struct that points to a null terminated string inside
the user process containing a name for the vma.  vmas that
point to the same address will be merged, but vmas that
point to equivalent strings at different addresses will
not be merged.

Userspace can set the name for a region of memory by calling
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name);
Setting the name to NULL clears it.

The names of named anonymous vmas are shown in /proc/pid/maps
as [anon:&lt;name&gt;] and in /proc/pid/smaps in a new "Name" field
that is only present for named vmas.  If the userspace pointer
is no longer valid all or part of the name will be replaced
with "&lt;fault&gt;".

The idea to store a userspace pointer to reduce the complexity
within mm (at the expense of the complexity of reading
/proc/pid/mem) came from Dave Hansen.  This results in no
runtime overhead in the mm subsystem other than comparing
the anon_name pointers when considering vma merging.  The pointer
is stored in a union with fieds that are only used on file-backed
mappings, so it does not increase memory usage.

Change-Id: I53b093d98dc24f41377824f34e076edced4a6f07
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: android: lowmemorykiller: implement task's adj rbtree</title>
<updated>2016-06-13T04:47:39+00:00</updated>
<author>
<name>Hong-Mei Li</name>
<email>a21834@motorola.com</email>
</author>
<published>2013-06-28T11:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=6f04da23b1e3aa60626bfef868ee89a77cebd637'/>
<id>6f04da23b1e3aa60626bfef868ee89a77cebd637</id>
<content type='text'>
Based on the current LMK implementation, LMK has to scan all processes to
select the correct task to kill during low memory.
The basic idea for the optimization is to :
queue all tasks with oom_score_adj priority, and then LMK just selects the
proper task from the queue(rbtree) to kill.

performance improvement:
the current implementation: average time to find a task to kill : 1004us
the optimized implementation: average time to find a task to kill: 43us

Change-Id: I4dbbdd5673314dbbdabb71c3eff0dc229ce4ea91
Signed-off-by: Hong-Mei Li &lt;a21834@motorola.com&gt;
Reviewed-on: http://gerrit.pcs.mot.com/548917
SLT-Approved: Slta Waiver &lt;sltawvr@motorola.com&gt;
Tested-by: Jira Key &lt;jirakey@motorola.com&gt;
Reviewed-by: Yi-Wei Zhao &lt;gbjc64@motorola.com&gt;
Submit-Approved: Jira Key &lt;jirakey@motorola.com&gt;
Signed-off-by: D. Andrei Măceș &lt;dmaces@nd.edu&gt;

Conflicts:
	drivers/staging/android/Kconfig
	drivers/staging/android/lowmemorykiller.c
	fs/proc/base.c
	mm/oom_kill.c

Conflicts:
	drivers/staging/android/lowmemorykiller.c
	mm/oom_kill.c

Conflicts:
	mm/oom_kill.c

Conflicts:
	drivers/staging/android/lowmemorykiller.c
	mm/oom_kill.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on the current LMK implementation, LMK has to scan all processes to
select the correct task to kill during low memory.
The basic idea for the optimization is to :
queue all tasks with oom_score_adj priority, and then LMK just selects the
proper task from the queue(rbtree) to kill.

performance improvement:
the current implementation: average time to find a task to kill : 1004us
the optimized implementation: average time to find a task to kill: 43us

Change-Id: I4dbbdd5673314dbbdabb71c3eff0dc229ce4ea91
Signed-off-by: Hong-Mei Li &lt;a21834@motorola.com&gt;
Reviewed-on: http://gerrit.pcs.mot.com/548917
SLT-Approved: Slta Waiver &lt;sltawvr@motorola.com&gt;
Tested-by: Jira Key &lt;jirakey@motorola.com&gt;
Reviewed-by: Yi-Wei Zhao &lt;gbjc64@motorola.com&gt;
Submit-Approved: Jira Key &lt;jirakey@motorola.com&gt;
Signed-off-by: D. Andrei Măceș &lt;dmaces@nd.edu&gt;

Conflicts:
	drivers/staging/android/Kconfig
	drivers/staging/android/lowmemorykiller.c
	fs/proc/base.c
	mm/oom_kill.c

Conflicts:
	drivers/staging/android/lowmemorykiller.c
	mm/oom_kill.c

Conflicts:
	mm/oom_kill.c

Conflicts:
	drivers/staging/android/lowmemorykiller.c
	mm/oom_kill.c
</pre>
</div>
</content>
</entry>
<entry>
<title>mm/vmscan: Add #ifdef around "WasActive page flag"</title>
<updated>2016-06-12T11:20:22+00:00</updated>
<author>
<name>Paul Reioux</name>
<email>paul@paul-Precision-WorkStation-T5500.(none)</email>
</author>
<published>2012-01-26T22:57:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=d6cc98c629a36ddd0c44cac326082034e73a09c0'/>
<id>d6cc98c629a36ddd0c44cac326082034e73a09c0</id>
<content type='text'>
also fix a merge error @ putback_lru_page
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
also fix a merge error @ putback_lru_page
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: implement WasActive page flag (for improving cleancache)</title>
<updated>2016-06-12T11:20:21+00:00</updated>
<author>
<name>Dan Magenheimer</name>
<email>dan.magenheimer@oracle.com</email>
</author>
<published>2012-01-26T00:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=1e291c9a70e255278ddb451097f0d65126556b61'/>
<id>1e291c9a70e255278ddb451097f0d65126556b61</id>
<content type='text'>
(Feedback welcome if there is a different/better way to do this
without using a page flag!)

Since about 2.6.27, the page replacement algorithm maintains
an "active" bit to help decide which pages are most eligible
to reclaim, see http://linux-mm.org/PageReplacementDesign

This "active' information is also useful to cleancache but is lost
by the time that cleancache has the opportunity to preserve the
pageful of data.  This patch adds a new page flag "WasActive" to
retain the state.  The flag may possibly be useful elsewhere.

It is up to each cleancache backend to utilize the bit as
it desires.  The matching patch for zcache is included here
for clarification/discussion purposes, though it will need to
go through GregKH and the staging tree.

The patch resolves issues reported with cleancache which occur
especially during streaming workloads on older processors,
see https://lkml.org/lkml/2011/8/17/351

Signed-off-by: Dan Magenheimer &lt;dan.magenheimer@oracle.com&gt;

Conflicts:
	include/linux/page-flags.h

Change-Id: I0fcb2302a7b9c5e66db005229f679baee90f262f

Conflicts:
	include/linux/page-flags.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(Feedback welcome if there is a different/better way to do this
without using a page flag!)

Since about 2.6.27, the page replacement algorithm maintains
an "active" bit to help decide which pages are most eligible
to reclaim, see http://linux-mm.org/PageReplacementDesign

This "active' information is also useful to cleancache but is lost
by the time that cleancache has the opportunity to preserve the
pageful of data.  This patch adds a new page flag "WasActive" to
retain the state.  The flag may possibly be useful elsewhere.

It is up to each cleancache backend to utilize the bit as
it desires.  The matching patch for zcache is included here
for clarification/discussion purposes, though it will need to
go through GregKH and the staging tree.

The patch resolves issues reported with cleancache which occur
especially during streaming workloads on older processors,
see https://lkml.org/lkml/2011/8/17/351

Signed-off-by: Dan Magenheimer &lt;dan.magenheimer@oracle.com&gt;

Conflicts:
	include/linux/page-flags.h

Change-Id: I0fcb2302a7b9c5e66db005229f679baee90f262f

Conflicts:
	include/linux/page-flags.h
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: remove compressed copy from zram in-memory</title>
<updated>2016-06-12T11:20:21+00:00</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2013-09-25T23:57:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=c72e09b31537cd8c558f70fd00d40c755e670114'/>
<id>c72e09b31537cd8c558f70fd00d40c755e670114</id>
<content type='text'>
Swap subsystem does lazy swap slot free with expecting the page would be
swapped out again so we can avoid unnecessary write.

But the problem in in-memory swap(ex, zram) is that it consumes memory
space until vm_swap_full(ie, used half of all of swap device) condition
meet.  It could be bad if we use multiple swap device, small in-memory
swap and big storage swap or in-memory swap alone.

This patch makes swap subsystem free swap slot as soon as swap-read is
completed and make the swapcache page dirty so the page should be
written out the swap device to reclaim it.  It means we never lose it.

I tested this patch with kernel compile workload.

1. before

   compile time : 9882.42
   zram max wasted space by fragmentation: 13471881 byte
   memory space consumed by zram: 174227456 byte
   the number of slot free notify: 206684

2. after

   compile time : 9653.90
   zram max wasted space by fragmentation: 11805932 byte
   memory space consumed by zram: 154001408 byte
   the number of slot free notify: 426972

[akpm@linux-foundation.org: tweak comment text]
[artem.savkov@gmail.com: fix BUG due to non-swapcache pages in end_swap_bio_read()]
[akpm@linux-foundation.org: invert unlikely() test, augment comment, 80-col cleanup]
Signed-off-by: Dan Magenheimer &lt;dan.magenheimer@oracle.com&gt;
Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Signed-off-by: Artem Savkov &lt;artem.savkov@gmail.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad@darnok.org&gt;
Cc: Shaohua Li &lt;shli@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;

Change-Id: I8f11fb7f0391954435002e7f290352f311c907d4

Signed-off-by: Paul Reioux &lt;reioux@gmail.com&gt;

Conflicts:
	mm/page_io.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Swap subsystem does lazy swap slot free with expecting the page would be
swapped out again so we can avoid unnecessary write.

But the problem in in-memory swap(ex, zram) is that it consumes memory
space until vm_swap_full(ie, used half of all of swap device) condition
meet.  It could be bad if we use multiple swap device, small in-memory
swap and big storage swap or in-memory swap alone.

This patch makes swap subsystem free swap slot as soon as swap-read is
completed and make the swapcache page dirty so the page should be
written out the swap device to reclaim it.  It means we never lose it.

I tested this patch with kernel compile workload.

1. before

   compile time : 9882.42
   zram max wasted space by fragmentation: 13471881 byte
   memory space consumed by zram: 174227456 byte
   the number of slot free notify: 206684

2. after

   compile time : 9653.90
   zram max wasted space by fragmentation: 11805932 byte
   memory space consumed by zram: 154001408 byte
   the number of slot free notify: 426972

[akpm@linux-foundation.org: tweak comment text]
[artem.savkov@gmail.com: fix BUG due to non-swapcache pages in end_swap_bio_read()]
[akpm@linux-foundation.org: invert unlikely() test, augment comment, 80-col cleanup]
Signed-off-by: Dan Magenheimer &lt;dan.magenheimer@oracle.com&gt;
Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Signed-off-by: Artem Savkov &lt;artem.savkov@gmail.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad@darnok.org&gt;
Cc: Shaohua Li &lt;shli@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;

Change-Id: I8f11fb7f0391954435002e7f290352f311c907d4

Signed-off-by: Paul Reioux &lt;reioux@gmail.com&gt;

Conflicts:
	mm/page_io.c
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: Need page_swap_info() helper method from upstream</title>
<updated>2016-06-12T11:20:18+00:00</updated>
<author>
<name>D. Andrei Măceș</name>
<email>dmaces@nd.edu</email>
</author>
<published>2015-09-30T19:18:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=4698b1b9e737365e206f1ef55a864d8e205fe8f3'/>
<id>4698b1b9e737365e206f1ef55a864d8e205fe8f3</id>
<content type='text'>
Stolen from commit f981c5950fa85916ba49bea5d9a7a5078f47e569:

"mm: methods for teaching filesystems about PG_swapcache pages"

Change-Id: I6673913f9c825d3a6de88a652e99bcaf04eb1dd6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stolen from commit f981c5950fa85916ba49bea5d9a7a5078f47e569:

"mm: methods for teaching filesystems about PG_swapcache pages"

Change-Id: I6673913f9c825d3a6de88a652e99bcaf04eb1dd6
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: swap: don't delay swap free for fast swap devices</title>
<updated>2016-06-12T11:20:18+00:00</updated>
<author>
<name>Vinayak Menon</name>
<email>vinmenon@codeaurora.org</email>
</author>
<published>2015-02-25T14:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=a6ce37fb73dce407da9d7d1d03408602be84177c'/>
<id>a6ce37fb73dce407da9d7d1d03408602be84177c</id>
<content type='text'>
There are couple of issues with swapcache usage when ZRAM is used
as swap device.
1) Kernel does a swap readahead which can be around 6 to 8 pages
depending on total ram, which is not required for zram since
accesses are fast.
2) Kernel delays the freeing up of swapcache expecting a later hit,
which again is useless in the case of zram.
3) This is not related to swapcache, but zram usage itself.
As mentioned in (2) kernel delays freeing of swapcache, but along with
that it delays zram compressed page free also. i.e. there can be 2 copies,
though one is compressed.

This patch addresses these issues using two new flags
QUEUE_FLAG_FAST and SWP_FAST, to indicate that accesses to the device
will be fast and cheap, and instructs the swap layer to free up
swap space agressively, and not to do read ahead.

Change-Id: I5d2d5176a5f9420300bb2f843f6ecbdb25ea80e4
Signed-off-by: Vinayak Menon &lt;vinmenon@codeaurora.org&gt;
Signed-off-by: D. Andrei Măceș &lt;dmaces@nd.edu&gt;

Conflicts:
	include/linux/blkdev.h
	include/linux/swap.h
	mm/swap_state.c
	mm/swapfile.c

Conflicts:
	include/linux/blkdev.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are couple of issues with swapcache usage when ZRAM is used
as swap device.
1) Kernel does a swap readahead which can be around 6 to 8 pages
depending on total ram, which is not required for zram since
accesses are fast.
2) Kernel delays the freeing up of swapcache expecting a later hit,
which again is useless in the case of zram.
3) This is not related to swapcache, but zram usage itself.
As mentioned in (2) kernel delays freeing of swapcache, but along with
that it delays zram compressed page free also. i.e. there can be 2 copies,
though one is compressed.

This patch addresses these issues using two new flags
QUEUE_FLAG_FAST and SWP_FAST, to indicate that accesses to the device
will be fast and cheap, and instructs the swap layer to free up
swap space agressively, and not to do read ahead.

Change-Id: I5d2d5176a5f9420300bb2f843f6ecbdb25ea80e4
Signed-off-by: Vinayak Menon &lt;vinmenon@codeaurora.org&gt;
Signed-off-by: D. Andrei Măceș &lt;dmaces@nd.edu&gt;

Conflicts:
	include/linux/blkdev.h
	include/linux/swap.h
	mm/swap_state.c
	mm/swapfile.c

Conflicts:
	include/linux/blkdev.h
</pre>
</div>
</content>
</entry>
<entry>
<title>mm/zsmalloc: allocate exactly size of struct zs_pool</title>
<updated>2016-06-12T11:20:17+00:00</updated>
<author>
<name>Ganesh Mahendran</name>
<email>opensource.ganesh@gmail.com</email>
</author>
<published>2014-12-13T00:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=d997b41417d94c22baaabd8d84a6a4f1e2e93fb9'/>
<id>d997b41417d94c22baaabd8d84a6a4f1e2e93fb9</id>
<content type='text'>
In zs_create_pool(), we allocate memory more then sizeof(struct zs_pool)
  ovhd_size = roundup(sizeof(*pool), PAGE_SIZE);

This patch allocate memory of exactly needed size.

Change-Id: Id0ada356009c92bf791c94be073f4467f7bb1aac
Signed-off-by: Ganesh Mahendran &lt;opensource.ganesh@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Dan Streetman &lt;ddstreet@ieee.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In zs_create_pool(), we allocate memory more then sizeof(struct zs_pool)
  ovhd_size = roundup(sizeof(*pool), PAGE_SIZE);

This patch allocate memory of exactly needed size.

Change-Id: Id0ada356009c92bf791c94be073f4467f7bb1aac
Signed-off-by: Ganesh Mahendran &lt;opensource.ganesh@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
