Re: mm: use-after-free in collapse_huge_page

2016-09-02 Thread Ebru Akagunduz
> > @@ -898,13 +899,13 @@ static bool __collapse_huge_page_swapin(struct > mm_struct *mm, > /* do_swap_page returns VM_FAULT_RETRY with released mmap_sem */ > if (ret & VM_FAULT_RETRY) { > down_read(&mm->mmap_sem); > - if (hug

[PATCH] mm, thp: fix leaking mapped pte in __collapse_huge_page_swapin()

2016-09-02 Thread Ebru Akagunduz
Currently, khugepaged does not let swapin, if there is no enough young pages in a THP. The problem is when a THP does not have enough young page, khugepaged leaks mapped ptes. This patch prohibits leaking mapped ptes. Signed-off-by: Ebru Akagunduz Suggested-by: Andrea Arcangeli --- mm

[RFC PATCH v3 2/2] mm, thp: convert from optimistic swapin collapsing to conservative

2016-07-09 Thread Ebru Akagunduz
To detect whether khugepaged swapin worthwhile, this patch checks the amount of young pages. There should be at least half of HPAGE_PMD_NR to swapin. Signed-off-by: Ebru Akagunduz Suggested-by: Minchan Kim --- Changes in v2: - Don't change thp design, only notice amount of young page

[PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin readahead functions

2016-07-09 Thread Ebru Akagunduz
After fixing swapin issues, comment lines stayed as in old version. This patch updates the comments. Signed-off-by: Ebru Akagunduz Cc: Hillf Danton --- Changes in v2: - Newly created in this version. Changes in v3: - Replace Reported-by with Cc (Hillf Danton) - Remove RFC tag (Hillf Danton

[RFC PATCH v3 0/2] mm, thp: convert from optimistic swapin collapsing to conservative

2016-07-09 Thread Ebru Akagunduz
patch automatically dropped - Set comment line fixing patch as first part of the series - Move changes from huge_memory.c to khugepaged.c Ebru Akagunduz (2): mm, thp: fix comment inconsistency for swapin readahead functions mm, thp: convert from optimistic swapin collapsing to conserv

[RFC PATCH v2 3/3] mm, thp: fix comment inconsistency for swapin readahead functions

2016-06-22 Thread Ebru Akagunduz
After fixing swapin issues, comment lines stayed as in old version. This patch updates the comments. Signed-off-by: Ebru Akagunduz Reported-by: Hillf Danton --- Changes in v2: - Newly created in this version. mm/huge_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: [PATCHv9-rebased2 01/37] mm, thp: make swapin readahead under down_read of mmap_sem

2016-06-22 Thread Ebru Akagunduz
uot; Cc'ed Hugh. Maybe I misunderstood him. > > Could you please suggest me a way to replace above changelog with the old? > > > We can ask Andrew for some advices. > > > > > > > > > They are cleaned up in subsequent darns? > > > > > Yes,

[RFC PATCH v2 2/3] mm, thp: convert from optimistic swapin collapsing to conservative

2016-06-22 Thread Ebru Akagunduz
To detect whether khugepaged swapin worthwhile, this patch checks the amount of young pages. There should be at least half of HPAGE_PMD_NR to swapin. Signed-off-by: Ebru Akagunduz Suggested-by: Minchan Kim --- Changes in v2: - Don't change thp design, only notice amount of young page

[RFC PATCH v2 1/3] mm, thp: revert allocstall comparing

2016-06-22 Thread Ebru Akagunduz
This patch takes back allocstall comparing when deciding whether swapin worthwhile because it does not work, if vmevent disabled. Related commit: http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=2548306628308aa6a326640d345a737bc898941d Signed-off-by: Ebru Akagunduz

[RFC PATCH v2 0/3] mm, thp: convert from optimistic swapin collapsing to conservative

2016-06-22 Thread Ebru Akagunduz
This patch series supplies to decide to swapin looking the amount of young pages. Removes allocstall comparing and fixes comment inconsistency. Ebru Akagunduz (3): mm, thp: revert allocstall comparing mm, thp: convert from optimistic swapin collapsing to conservative mm, thp: fix comment

Re: [PATCHv9-rebased2 01/37] mm, thp: make swapin readahead under down_read of mmap_sem

2016-06-18 Thread Ebru Akagunduz
On Thu, Jun 16, 2016 at 01:08:54PM +0300, Kirill A. Shutemov wrote: > On Thu, Jun 16, 2016 at 02:52:52PM +0800, Hillf Danton wrote: > > > > > > From: Ebru Akagunduz > > > > > > Currently khugepaged makes swapin readahead under down_write. This patch

Re: [PATCHv9-rebased2 05/37] khugepaged: recheck pmd after mmap_sem re-acquired

2016-06-16 Thread Ebru Akagunduz
On Wed, Jun 15, 2016 at 11:06:10PM +0300, Kirill A. Shutemov wrote: > Vlastimil noted[1] that pmd can be no longer valid after we drop > mmap_sem. We need recheck it once mmap_sem taken again. > > [1] http://lkml.kernel.org/r/12918dcd-a695-c6f4-e06f-69141c5f3...@suse.cz > > Signed-off-by: Kirill

Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative

2016-06-16 Thread Ebru Akagunduz
On Wed, Jun 15, 2016 at 03:40:53PM +0900, Minchan Kim wrote: > Hello, > > On Sat, Jun 11, 2016 at 10:16:00PM +0300, Ebru Akagunduz wrote: > > Currently, khugepaged collapses pages saying only > > a referenced page enough to create a THP. > > > > This patch chan

Re: [RFC PATCH 3/3] doc: add information about min_ptes_young

2016-06-13 Thread Ebru Akagunduz
On Sat, Jun 11, 2016 at 10:16:01PM +0300, Ebru Akagunduz wrote: > min_ptes_young specifies at least how many young pages needed > to create a THP. This threshold also effects when making swapin > readahead (if needed) to create a THP. We decide whether to make > swapin readahed wortw

Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative

2016-06-13 Thread Ebru Akagunduz
On Sat, Jun 11, 2016 at 10:16:00PM +0300, Ebru Akagunduz wrote: > Currently, khugepaged collapses pages saying only > a referenced page enough to create a THP. > > This patch changes the design from optimistic to conservative. > It gives a default threshold which is half of HPA

Re: [RFC PATCH 1/3] mm, thp: revert allocstall comparing

2016-06-13 Thread Ebru Akagunduz
On Sat, Jun 11, 2016 at 10:15:59PM +0300, Ebru Akagunduz wrote: > This patch takes back allocstall comparing when deciding > whether swapin worthwhile because it does not work, > if vmevent disabled. > > Related commit: > http://git.kernel.org/cgit/linux/kernel/git/next/linux-n

Re: [RFC PATCH 0/3] mm, thp: convert from optimistic to conservative

2016-06-13 Thread Ebru Akagunduz
On Sat, Jun 11, 2016 at 10:15:58PM +0300, Ebru Akagunduz wrote: > This patch series converts thp design from optimistic to conservative, > creates a sysfs integer knob for conservative threshold and documents it. > This patchset follows Michan Kim's suggestion. Related discussion

Re: [PATCH 0/3] mm, thp: remove duplication and fix locking issues in swapin

2016-06-11 Thread Ebru Akagunduz
On Fri, May 27, 2016 at 03:12:47PM +0200, Michal Hocko wrote: > On Mon 23-05-16 20:29:29, Ebru Akagunduz wrote: > > On Mon, May 23, 2016 at 08:14:08PM +0300, Ebru Akagunduz wrote: > > > This patch series removes duplication of included header > > > and fixes locking

[RFC PATCH 0/3] mm, thp: convert from optimistic to conservative

2016-06-11 Thread Ebru Akagunduz
This patch series converts thp design from optimistic to conservative, creates a sysfs integer knob for conservative threshold and documents it. Ebru Akagunduz (3): mm, thp: revert allocstall comparing mm, thp: convert from optimistic to conservative doc: add information about

[RFC PATCH 2/3] mm, thp: convert from optimistic to conservative

2016-06-11 Thread Ebru Akagunduz
Currently, khugepaged collapses pages saying only a referenced page enough to create a THP. This patch changes the design from optimistic to conservative. It gives a default threshold which is half of HPAGE_PMD_NR for referenced pages, also introduces a new sysfs knob. Signed-off-by: Ebru

[RFC PATCH 3/3] doc: add information about min_ptes_young

2016-06-11 Thread Ebru Akagunduz
Signed-off-by: Ebru Akagunduz --- Documentation/vm/transhuge.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 2ec6adb..0ae713b 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt

[RFC PATCH 1/3] mm, thp: revert allocstall comparing

2016-06-11 Thread Ebru Akagunduz
This patch takes back allocstall comparing when deciding whether swapin worthwhile because it does not work, if vmevent disabled. Related commit: http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=2548306628308aa6a326640d345a737bc898941d Signed-off-by: Ebru Akagunduz

[PATCH] mm, thp: fix locking inconsistency in collapse_huge_page

2016-06-03 Thread Ebru Akagunduz
=da4360877094368f6dfe75bbe804b0f0a5d575b0 Signed-off-by: Ebru Akagunduz --- mm/huge_memory.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 292cedd..8043d91 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c

Re: [linux-next: Tree for Jun 1] __khugepaged_exit rwsem_down_write_failed lockup

2016-06-02 Thread Ebru Akagunduz
On Thu, Jun 02, 2016 at 03:24:05PM +0200, Vlastimil Babka wrote: > [+CC's] > > On 06/02/2016 03:48 AM, Sergey Senozhatsky wrote: > >On (06/01/16 13:11), Stephen Rothwell wrote: > >>Hi all, > >> > >>Changes since 20160531: > >> > >>My fixes tree contains: > >> > >> of: silence warnings due to max(

[PATCH v2 0/3] mm, thp: remove duplication and fix locking issues in swapin

2016-05-27 Thread Ebru Akagunduz
This patch series removes duplication of included header and fixes locking inconsistency in khugepaged swapin. Ebru Akagunduz (3): mm, thp: remove duplication of included header mm, thp: fix possible circular locking dependency caused by sum_vm_event() mm, thp: make swapin readahead

[PATCH v2 2/3] mm, thp: fix possible circular locking dependency caused by sum_vm_event()

2016-05-27 Thread Ebru Akagunduz
[] SyS_write+0x44/0xa0 [] entry_SYSCALL_64_fastpath+0x1f/0xbd This patch moves sum_vm_event() before taking down_write(&mm->mmap_sem) to solve dependency lock. Signed-off-by: Ebru Akagunduz --- Changes in v2: - Nothing changed mm/huge_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deleti

[PATCH v2 3/3] mm, thp: make swapin readahead under down_read of mmap_sem

2016-05-27 Thread Ebru Akagunduz
. Afterwards, the test program touches the area by writing, it skips a page in each 20 pages of the area. Signed-off-by: Ebru Akagunduz --- Changes in v2: - Keep the comment next to down_write (Andrea Arcangeli) - To revalidate vma, use the same check methods which is placed in collapse_huge_page

[PATCH v2 1/3] mm, thp: remove duplication of included header

2016-05-27 Thread Ebru Akagunduz
swapops.h included for a second time in the commit: http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=639040960a340f6f987065fc52e149f4ea25ce25 This patch removes the duplication. Signed-off-by: Ebru Akagunduz --- Changes in v2: - Nothing changed mm/huge_memory.c | 1

Re: [PATCH 0/3] mm, thp: remove duplication and fix locking issues in swapin

2016-05-23 Thread Ebru Akagunduz
On Mon, May 23, 2016 at 08:14:08PM +0300, Ebru Akagunduz wrote: > This patch series removes duplication of included header > and fixes locking inconsistency in khugepaged swapin > > Ebru Akagunduz (3): > mm, thp: remove duplication of included header > mm, thp: fix possibl

[PATCH 3/3] mm, thp: make swapin readahead under down_read of mmap_sem

2016-05-23 Thread Ebru Akagunduz
. Afterwards, the test program touches the area by writing, it skips a page in each 20 pages of the area. Signed-off-by: Ebru Akagunduz --- mm/huge_memory.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index

[PATCH 1/3] mm, thp: remove duplication of included header

2016-05-23 Thread Ebru Akagunduz
swapops.h included for a second time in the commit: http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=639040960a340f6f987065fc52e149f4ea25ce25 This patch removes the duplication. Signed-off-by: Ebru Akagunduz --- mm/huge_memory.c | 1 - 1 file changed, 1 deletion

[PATCH 0/3] mm, thp: remove duplication and fix locking issues in swapin

2016-05-23 Thread Ebru Akagunduz
This patch series removes duplication of included header and fixes locking inconsistency in khugepaged swapin Ebru Akagunduz (3): mm, thp: remove duplication of included header mm, thp: fix possible circular locking dependency caused by sum_vm_event() mm, thp: make swapin readahead

[PATCH 2/3] mm, thp: fix possible circular locking dependency caused by sum_vm_event()

2016-05-23 Thread Ebru Akagunduz
[] SyS_write+0x44/0xa0 [] entry_SYSCALL_64_fastpath+0x1f/0xbd This patch moves sum_vm_event() before taking down_write(&mm->mmap_sem) to solve dependency lock. Signed-off-by: Ebru Akagunduz --- mm/huge_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/huge_memo

Re: [lkp] [mm, thp] 409ca714ac: INFO: possible circular locking dependency detected

2016-05-05 Thread Ebru Akagunduz
On Thu, May 05, 2016 at 01:18:43PM +0300, Kirill A. Shutemov wrote: > On Thu, May 05, 2016 at 09:32:45AM +0800, kernel test robot wrote: > > FYI, we noticed the following commit: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > commit 409ca714ac58768342cd39ca7

[PATCH v6 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-04-08 Thread Ebru Akagunduz
-- Signed-off-by: Ebru Akagunduz Acked-by: Rik van Riel --- Changes in v2: - Add reference to specify which patch fixed (Ebru Akagunduz) - Fix commit subject line (Ebru Akagunduz) Changes in v3: - Remove default values of allocstall (Kirill A. Shutemov) Changes in v4: - define unsigned long

[PATCH v6 1/2] mm, vmstat: calculate particular vm event

2016-04-08 Thread Ebru Akagunduz
Currently, vmstat can calculate specific vm event with all_vm_events() however it calculates all vm events at a time. This patch introduces a new function to calculate only single event at a time. Signed-off-by: Ebru Akagunduz Suggested-by: Kirill A. Shutemov Acked-by: Kirill A. Shutemov

[PATCH v6 0/2] mm, thp: Fix unnecessarry resource consuming in swapin

2016-04-08 Thread Ebru Akagunduz
This patch series fixes unnecessarry resource consuming in khugepaged swapin and introduces a new function to calculate value of specific vm event. Ebru Akagunduz (2): mm, vmstat: calculate particular vm event mm, thp: avoid unnecessary swapin in khugepaged include/linux/vmstat.h | 6

Re: [PATCH v5 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-04-07 Thread Ebru Akagunduz
On Thu, Apr 07, 2016 at 10:47:59PM +0300, Cyrill Gorcunov wrote: > On Thu, Apr 07, 2016 at 03:39:05PM -0400, Rik van Riel wrote: > > > This !=) looks like someone got fun ;) > > > > Looks like someone sent out emails before refreshing the > > patch, which is a such an easy mistake to make I must h

[PATCH v5 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-04-07 Thread Ebru Akagunduz
-- Signed-off-by: Ebru Akagunduz --- Changes in v2: - Add reference to specify which patch fixed (Ebru Akagunduz) - Fix commit subject line (Ebru Akagunduz) Changes in v3: - Remove default values of allocstall (Kirill A. Shutemov) Changes in v4: - define unsigned long allocstall instead of uns

[PATCH v5 1/2] mm, vmstat: calculate particular vm event

2016-04-07 Thread Ebru Akagunduz
Currently, vmstat can calculate specific vm event with all_vm_events() however it allocates all vm events to stack. This patch introduces a helper to sum value of a specific vm event over all cpu, without loading all the events. Signed-off-by: Ebru Akagunduz Suggested-by: Kirill A. Shutemov

[PATCH v5 0/2] mm, thp: Fix unnecessarry resource consuming in swapin

2016-04-07 Thread Ebru Akagunduz
This patch series fixes unnecessarry resource consuming in khugepaged swapin and introduces a new function to calculate value of specific vm event. Ebru Akagunduz (2): mm, vmstat: calculate particular vm event mm, thp: avoid unnecessary swapin in khugepaged include/linux/vmstat.h | 6

[PATCH v4 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-03-20 Thread Ebru Akagunduz
patch| 604440 kB | 348160 kB | 195560 kB |%57| --- Without patch | 586816 kB | 464896 kB | 213184 kB |%79| --- Signed-off-by: Ebru Akagunduz

[PATCH v4 0/2] mm, thp: Fix unnecessarry resource consuming in swapin

2016-03-20 Thread Ebru Akagunduz
This patch series fixes unnecessarry resource consuming in khugepaged swapin and introduces a new function to calculate value of specific vm event. Ebru Akagunduz (2): mm, vmstat: calculate particular vm event mm, thp: avoid unnecessary swapin in khugepaged include/linux/vmstat.h | 6

[PATCH v4 1/2] mm, vmstat: calculate particular vm event

2016-03-20 Thread Ebru Akagunduz
Currently, vmstat can calculate specific vm event with all_vm_events() however it allocates all vm events to stack. This patch introduces a helper to sum value of a specific vm event over all cpu, without loading all the events. Signed-off-by: Ebru Akagunduz Suggested-by: Kirill A. Shutemov

Re: [PATCH v3 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-03-20 Thread Ebru Akagunduz
On Thu, Mar 17, 2016 at 12:07:44PM +0100, Vlastimil Babka wrote: > On 03/14/2016 10:40 PM, Ebru Akagunduz wrote: > >Currently khugepaged makes swapin readahead to improve > >THP collapse rate. This patch checks vm statistics > >to avoid workload of swapin, if unnecessary. S

Re: [PATCH v3 1/2] mm, vmstat: calculate particular vm event

2016-03-19 Thread Ebru Akagunduz
On Wed, Mar 16, 2016 at 04:54:13PM +0100, Vlastimil Babka wrote: > On 03/14/2016 10:40 PM, Ebru Akagunduz wrote: > >Currently, vmstat can calculate specific vm event with all_vm_events() > >however it allocates all vm events to stack. This patch introduces > >a helper to sum v

[PATCH v3 1/2] mm, vmstat: calculate particular vm event

2016-03-14 Thread Ebru Akagunduz
Currently, vmstat can calculate specific vm event with all_vm_events() however it allocates all vm events to stack. This patch introduces a helper to sum value of a specific vm event over all cpu, without loading all the events. Signed-off-by: Ebru Akagunduz Acked-by: Kirill A. Shutemov

[PATCH v3 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-03-14 Thread Ebru Akagunduz
patch| 551992 kB | 368640 kB | 248008 kB |%66| --- Without patch | 586816 kB | 464896 kB | 213184 kB |%79| --- Signed-off-by: Ebru Akagunduz --- Ch

[PATCH v3 0/2] mm, thp: Fix unnecessarry resource consuming in swapin

2016-03-14 Thread Ebru Akagunduz
This patch series fixes unnecessarry resource consuming in khugepaged swapin and introduces a new function to calculate value of specific vm event. Ebru Akagunduz (2): mm, vmstat: calculate particular vm event mm, thp: avoid unnecessary swapin in khugepaged include/linux/vmstat.h | 6

[PATCH v2 1/2] mm, vmstat: calculate particular vm event

2016-03-13 Thread Ebru Akagunduz
Currently, vmstat can calculate specific vm event with all_vm_events() however it allocates all vm events to stack. This patch introduces a helper to sum value of a specific vm event over all cpu, without loading all the events. Signed-off-by: Ebru Akagunduz --- Changes in v2: - this patch

[PATCH v2 2/2] mm, thp: avoid unnecessary swapin in khugepaged

2016-03-13 Thread Ebru Akagunduz
patch| 714164 kB | 489472 kB | 85836 kB |%68| --- Without patch | 586816 kB | 464896 kB | 213184 kB |%79| --- Signed-off-by: Ebru Akagunduz

[PATCH v2 0/2] mm, thp: Fix unnecessarry resource consuming in swapin

2016-03-13 Thread Ebru Akagunduz
This patch series fixes unnecessarry resource consuming in khugepaged swapin and introduces a new function to calculate value of specific vm event. Ebru Akagunduz (2): mm, vmstat: calculate particular vm event mm, thp: avoid unnecessary swapin in khugepaged include/linux/vmstat.h | 2

[PATCH] mm: avoid unnecessary swapin in khugepaged

2016-03-09 Thread Ebru Akagunduz
patch| 637932 kB | 559104 kB | 162068 kB |%69| --- Without patch | 586816 kB | 464896 kB | 213184 kB |%79| --- Signed-off-by: Ebru Akagunduz --

Re: [RFC v5 0/3] mm: make swapin readahead to gain more thp performance

2016-03-03 Thread Ebru Akagunduz
On Fri, Feb 26, 2016 at 09:51:56AM -0500, Rik van Riel wrote: > On Thu, 2016-02-25 at 22:17 -0800, Hugh Dickins wrote: > > On Fri, 26 Feb 2016, Ebru Akagunduz wrote: > > > in Thu, Feb 25, 2016 at 05:35:50PM -0500, Rik van Riel wrote: > >  > > > &

Re: [RFC v5 0/3] mm: make swapin readahead to gain more thp performance

2016-02-25 Thread Ebru Akagunduz
in Thu, Feb 25, 2016 at 05:35:50PM -0500, Rik van Riel wrote: > On Wed, 2016-02-24 at 23:36 -0800, Hugh Dickins wrote: > >  > > Doesn't this imply that __collapse_huge_page_swapin() will initiate > > all > > the necessary swapins for a THP, then (given the > > FAULT_FLAG_ALLOW_RETRY) > > not wait f

Re: [RFC v5 0/3] mm: make swapin readahead to gain more thp performance

2016-02-25 Thread Ebru Akagunduz
On Wed, Feb 24, 2016 at 11:36:30PM -0800, Hugh Dickins wrote: > On Mon, 14 Sep 2015, Andrew Morton wrote: > > On Mon, 14 Sep 2015 22:31:42 +0300 Ebru Akagunduz > > wrote: > > > > > This patch series makes swapin readahead up to a > > > certain numbe

[PATCH] doc: add information about max_ptes_swap

2015-09-17 Thread Ebru Akagunduz
collapsed, resulting fewer pages being collapsed into THPs, and lower memory access performance. Signed-off-by: Ebru Akagunduz --- Documentation/vm/transhuge.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index

Re: [RFC v5 2/3] mm: make optimistic check for swapin readahead

2015-09-15 Thread Ebru Akagunduz
On Mon, Sep 14, 2015 at 02:33:55PM -0700, Andrew Morton wrote: > On Mon, 14 Sep 2015 22:31:44 +0300 Ebru Akagunduz > wrote: > > > This patch introduces new sysfs integer knob > > /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_swap > > which makes optimistic

[RFC v5 3/3] mm: make swapin readahead to improve thp collapse rate

2015-09-14 Thread Ebru Akagunduz
memory, it did not change over time. With this patch, after 10 minutes of waiting khugepaged had collapsed %99 of the program's memory. Signed-off-by: Ebru Akagunduz Acked-by: Rik van Riel --- Changes in v2: - Use FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_RETRY_NOWAIT flag instead of 0x0 when c

[RFC v5 2/3] mm: make optimistic check for swapin readahead

2015-09-14 Thread Ebru Akagunduz
using tracepoints amount of unmapped ptes. Signed-off-by: Ebru Akagunduz --- Changes in v2: - Nothing changed Changes in v3: - Define constant for exact tracepoint result (Vlastimil Babka) Changes in v4: - Add sysfs knob request (Kirill A. Shutemov) Changes in v5: - Rename MM_EXCEED_SWAP_PTE

[RFC v5 1/3] mm: add tracepoint for scanning pages

2015-09-14 Thread Ebru Akagunduz
Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. Signed-off-by: Ebru Akagunduz Acked-by: Kirill

[RFC v5 0/3] mm: make swapin readahead to gain more thp performance

2015-09-14 Thread Ebru Akagunduz
| --- Ebru Akagunduz (3): mm: add tracepoint for scanning pages mm: make optimistic check for swapin readahead mm: make swapin readahead to improve thp collapse rate include/trace/events/huge_memory.h | 165 mm/huge_memory.c

Re: [RESEND RFC v4 1/3] mm: add tracepoint for scanning pages

2015-09-05 Thread Ebru Akagunduz
On Fri, Sep 04, 2015 at 12:44:59PM -0400, Rik van Riel wrote: > On 09/04/2015 12:07 PM, Vlastimil Babka wrote: > > On 09/03/2015 10:51 PM, Ebru Akagunduz wrote: > >> Using static tracepoints, data of functions is recorded. > >> It is good to automatize debugging without

[RESEND RFC v4 2/3] mm: make optimistic check for swapin readahead

2015-09-03 Thread Ebru Akagunduz
using tracepoints amount of unmapped ptes. Signed-off-by: Ebru Akagunduz --- Changes in v2: - Nothing changed Changes in v3: - Define constant for exact tracepoint result (Vlastimil Babka) Changes in v4: - Add sysfs knob request (Kirill A. Shutemov) include/trace/events/huge_memory.h | 10

[RESEND RFC v4 1/3] mm: add tracepoint for scanning pages

2015-09-03 Thread Ebru Akagunduz
Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. Signed-off-by: Ebru Akagunduz Acked-by: Kirill

[RESEND RFC v4 3/3] mm: make swapin readahead to improve thp collapse rate

2015-09-03 Thread Ebru Akagunduz
memory, it did not change over time. With this patch, after 10 minutes of waiting khugepaged had collapsed %90 of the program's memory. Signed-off-by: Ebru Akagunduz Acked-by: Rik van Riel --- Changes in v2: - Use FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_RETRY_NOWAIT flag instead of 0x0 when c

[RESEND RFC v4 0/3] mm: make swapin readahead to gain more thp performance

2015-09-03 Thread Ebru Akagunduz
| --- Ebru Akagunduz (3): mm: add tracepoint for scanning pages mm: make optimistic check for swapin readahead mm: make swapin readahead to improve thp collapse rate include/linux/mm.h | 4 + include/trace/events/huge_memory.h | 126

[RFC v4 3/3] mm: make swapin readahead to improve thp collapse rate

2015-08-18 Thread Ebru Akagunduz
memory, it did not change over time. With this patch, after 10 minutes of waiting khugepaged had collapsed %90 of the program's memory. Signed-off-by: Ebru Akagunduz Acked-by: Rik van Riel --- Changes in v2: - Use FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_RETRY_NOWAIT flag instead of 0x0 when c

[RFC v4 1/3] mm: add tracepoint for scanning pages

2015-08-18 Thread Ebru Akagunduz
Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. Signed-off-by: Ebru Akagunduz Acked-by: Kirill

[RFC v4 2/3] mm: make optimistic check for swapin readahead

2015-08-18 Thread Ebru Akagunduz
using tracepoints amount of unmapped ptes. Signed-off-by: Ebru Akagunduz --- Changes in v2: - Nothing changed Changes in v3: - Define constant for exact tracepoint result (Vlastimil Babka) Changes in v4: - Add sysfs knob request (Kirill A. Shutemov) include/trace/events/huge_memory.h | 10

[RFC v4 0/3] mm: make swapin readahead to gain more thp performance

2015-08-18 Thread Ebru Akagunduz
| --- Ebru Akagunduz (3): mm: add tracepoint for scanning pages mm: make optimistic check for swapin readahead mm: make swapin readahead to improve thp collapse rate include/linux/mm.h | 4 + include/trace/events/huge_memory.h | 126

[RFC v3 1/3] mm: add tracepoint for scanning pages

2015-07-14 Thread Ebru Akagunduz
On Tue, Jul 14, 2015 at 12:06:46AM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 13, 2015 at 11:28:02PM +0300, Ebru Akagunduz wrote: > > Using static tracepoints, data of functions is recorded. > > It is good to automatize debugging without doing a lot > > of chang

[RFC v3 2/3] mm: make optimistic check for swapin readahead

2015-07-14 Thread Ebru Akagunduz
On Tue, Jul 14, 2015 at 12:07:27AM +0300, Kirill A. Shutemov wrote: > On Mon, Jul 13, 2015 at 11:28:03PM +0300, Ebru Akagunduz wrote: > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > > index 595edd9..b4cef9d 100644 > > --- a/mm/huge_memory.c > > +++ b/mm/huge_

[RFC v3 2/3] mm: make optimistic check for swapin readahead

2015-07-13 Thread Ebru Akagunduz
This patch makes optimistic check for swapin readahead to increase thp collapse rate. Before getting swapped out pages to memory, checks them and allows up to a certain number. It also prints out using tracepoints amount of unmapped ptes. Signed-off-by: Ebru Akagunduz --- Changes in v2

[RFC v3 0/3] mm: make swapin readahead to gain more thp performance

2015-07-13 Thread Ebru Akagunduz
| --- Ebru Akagunduz (3): mm: add tracepoint for scanning pages mm: make optimistic check for swapin readahead mm: make swapin readahead to improve thp collapse rate include/linux/mm.h | 23 + include/trace/events/huge_memory.h | 127

[RFC v3 3/3] mm: make swapin readahead to improve thp collapse rate

2015-07-13 Thread Ebru Akagunduz
memory, it did not change over time. With this patch, after 10 minutes of waiting khugepaged had collapsed %99 of the program's memory. Signed-off-by: Ebru Akagunduz Acked-by: Rik van Riel --- Changes in v2: - Use FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_RETRY_NOWAIT flag instead of 0x0 when c

[RFC v3 1/3] mm: add tracepoint for scanning pages

2015-07-13 Thread Ebru Akagunduz
Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. Signed-off-by: Ebru Akagunduz Acked-by: Kirill

[RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-20 Thread Ebru Akagunduz
memory, it did not change over time. With this patch, after 10 minutes of waiting khugepaged had collapsed %99 of the program's memory. Signed-off-by: Ebru Akagunduz Acked-by: Rik van Riel --- Changes in v2: - Use FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_RETRY_NOWAIT flag instead of 0x0 when c

[RFC v2 1/3] mm: add tracepoint for scanning pages

2015-06-20 Thread Ebru Akagunduz
Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. Signed-off-by: Ebru Akagunduz Acked-by: Rik van

[RFC v2 2/3] mm: make optimistic check for swapin readahead

2015-06-20 Thread Ebru Akagunduz
This patch makes optimistic check for swapin readahead to increase thp collapse rate. Before getting swapped out pages to memory, checks them and allows up to a certain number. It also prints out using tracepoints amount of unmapped ptes. Signed-off-by: Ebru Akagunduz --- Changes in v2

[RFC v2 0/3] mm: make swapin readahead to gain more thp performance

2015-06-20 Thread Ebru Akagunduz
| --- Ebru Akagunduz (3): mm: add tracepoint for scanning pages mm: make optimistic check for swapin readahead mm: make swapin readahead to improve thp collapse rate include/linux/mm.h | 4 ++ include/trace/events/huge_memory.h | 123

Re: [RFC 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-17 Thread Ebru Akagunduz
On Tue, Jun 16, 2015 at 11:20:20PM -0400, Rik van Riel wrote: > On 06/16/2015 05:15 PM, Andrew Morton wrote: > > On Sun, 14 Jun 2015 18:04:43 +0300 Ebru Akagunduz > > wrote: > > > >> This patch makes swapin readahead to improve thp collapse rate. > >> When

[RFC 2/3] mm: make optimistic check for swapin readahead

2015-06-14 Thread Ebru Akagunduz
This patch makes optimistic check for swapin readahead to increase thp collapse rate. Before getting swapped out pages to memory, checks them and allows up to a certain number. It also prints out using tracepoints amount of unmapped ptes. Signed-off-by: Ebru Akagunduz --- include/trace/events

[RFC 1/3] mm: add tracepoint for scanning pages

2015-06-14 Thread Ebru Akagunduz
Using static tracepoints, data of functions is recorded. It is good to automatize debugging without doing a lot of changes in the source code. This patch adds tracepoint for khugepaged_scan_pmd, collapse_huge_page and __collapse_huge_page_isolate. Signed-off-by: Ebru Akagunduz --- include

[RFC 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-14 Thread Ebru Akagunduz
memory, it did not change over time. With this patch, after 10 minutes of waiting khugepaged had collapsed %99 of the program's memory. Signed-off-by: Ebru Akagunduz --- I've written down test results: With the patch: After swapped out: cat /proc/pid/smaps: Anonymous:470760 kB Ano

[RFC 0/3] mm: make swapin readahead to gain more thp performance

2015-06-14 Thread Ebru Akagunduz
c/pid/smaps: Anonymous:238160 kB AnonHugePages:235520 kB Swap: 561844 kB Fraction: %98 After swapped in: cat /proc/pid/smaps: In ten minutes: Anonymous:499956 kB AnonHugePages:235520 kB Swap: 300048 kB Fraction: %47 Ebru Akagunduz (3):

[PATCH] mm: set khugepaged_max_ptes_none by 1/8 of HPAGE_PMD_NR

2015-02-27 Thread Ebru Akagunduz
://bugzilla.kernel.org/show_bug.cgi?id=93111 Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van Riel --- mm/huge_memory.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index e08e37a..497fb5a 100644 --- a/mm/huge_memory.c +++ b/mm

[PATCH] doc: add information about max_ptes_none

2015-02-26 Thread Ebru Akagunduz
leads to gain less thp performance. Value of max_ptes_none can waste cpu time very little, you can ignore it. Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van Riel --- Documentation/vm/transhuge.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/vm/transhuge.txt b

[PATCH v2] mm: incorporate zero pages into transparent huge pages

2015-02-11 Thread Ebru Akagunduz
VM_FAULT_FALLBACK for read faults. Without the patch, only %50 of the program was collapsed into THP and the percentage did not increase over time. With this patch after 10 minutes of waiting khugepaged had collapsed %99 of the program's memory. Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van

[PATCH] mm: incorporate zero pages into transparent huge pages

2015-02-09 Thread Ebru Akagunduz
VM_FAULT_FALLBACK for read faults. Without the patch, only %50 of the program was collapsed into THP and the percentage did not increase over time. With this patch after 10 minutes of waiting khugepaged had collapsed %89 of the program's memory. Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van

[PATCH v4] mm: incorporate read-only pages into transparent huge pages

2015-01-29 Thread Ebru Akagunduz
collapsed 60% of the program's memory back into THPs. Signed-off-by: Ebru Akagunduz Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van Riel Acked-by: Vlastimil Babka Acked-by: Zhang Yanfei --- Changes in v2: - Remove extra code indent (Vlastimil Babka) - Add comment line for check conditi

[PATCH v3] mm: incorporate read-only pages into transparent huge pages

2015-01-27 Thread Ebru Akagunduz
collapsed 50% of the program's memory back into THPs. Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van Riel Acked-by: Vlastimil Babka --- Changes in v2: - Remove extra code indent (Vlastimil Babka) - Add comment line for check condition of page_count() (Vlastimil Babka) - Add fast path optim

[PATCH v2] mm: incorporate read-only pages into transparent huge pages

2015-01-24 Thread Ebru Akagunduz
collapsed 48% of the program's memory back into THPs. Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van Riel Acked-by: Vlastimil Babka --- Changes in v2: - Remove extra code indent - Add fast path optimistic check to __collapse_huge_page_isolate() - Add comment line for check conditi

[PATCH] mm: incorporate read-only pages into transparent huge pages

2015-01-22 Thread Ebru Akagunduz
collapsed 55% of the program's memory back into THPs. Signed-off-by: Ebru Akagunduz Reviewed-by: Rik van Riel --- I've written down test results: With the patch: After swapped out: cat /proc/pid/smaps: Anonymous: 100352 kB AnonHugePages: 98304 kB Swap: 699652 kB Fraction:

[PATCH v2] scsi: ips.c: Use jiffies comparison instead of do_gettimeofday()

2014-10-20 Thread Ebru Akagunduz
do_gettimeofday() only can get 32-bit time types but the driver should be able to use dates that are after January 2038. Remove do_gettimeofday() and use jiffies comparison to supply 64-bit time types. Signed-off-by: Ebru Akagunduz --- drivers/scsi/ips.c | 25 + drivers

[PATCH] scsi: ips.c: use 64-bit time types

2014-10-08 Thread Ebru Akagunduz
This patch changes 32-bit time types to 64-bit in ips.c time_t can only represent signed 32-bit dates but the driver should represent dates that are after January 2038. Use time64_t type instead of time_t. Signed-off-by: Ebru Akagunduz --- drivers/scsi/ips.c | 6 -- drivers/scsi/ips.h | 2