[PATCH] drm/i915: Fix i915_gem_wait_for_idle oops due to active_requests check

2018-12-20 Thread Bin Yang
dule_lite Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109005 Signed-off-by: Bin Yang --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_request.c | 10 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) d

[PATCH] pstore: fix incorrect persistent ram buffer mapping

2018-09-11 Thread Bin Yang
-off-by: Bin Yang --- fs/pstore/ram_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 951a14e..7c05fdd 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -429,7 +429,7 @@ static void *persistent_ram_vmap

[PATCH] pstore: fix incorrect persistent ram buffer mapping

2018-09-11 Thread Bin Yang
-off-by: Bin Yang --- fs/pstore/ram_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 951a14e..7c05fdd 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -429,7 +429,7 @@ static void *persistent_ram_vmap

[PATCH v3 4/5] x86/mm: optimize static_protection() by using overlap()

2018-08-20 Thread Bin Yang
-by: Bin Yang --- arch/x86/mm/pageattr.c | 50 +- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index f630eb4..fd90c5b 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c

[PATCH v3 4/5] x86/mm: optimize static_protection() by using overlap()

2018-08-20 Thread Bin Yang
-by: Bin Yang --- arch/x86/mm/pageattr.c | 50 +- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index f630eb4..fd90c5b 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c

[PATCH v3 2/5] x86/mm: avoid static_protection() checking if not whole large page attr change

2018-08-20 Thread Bin Yang
. The approach and some of the comments came from Thomas Gleixner's email example for how to do this Suggested-by: Thomas Gleixner Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/arch/x86/mm

[PATCH v3 3/5] x86/mm: add help function to check specific protection flags in range

2018-08-20 Thread Bin Yang
Introduce the needs_static_protections() helper to check specific protection flags in range. It calls static_protection() to check whether any part of the address/len range is forced to change from 'prot'. Suggested-by: Dave Hansen Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 36

[PATCH v3 2/5] x86/mm: avoid static_protection() checking if not whole large page attr change

2018-08-20 Thread Bin Yang
. The approach and some of the comments came from Thomas Gleixner's email example for how to do this Suggested-by: Thomas Gleixner Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/arch/x86/mm

[PATCH v3 3/5] x86/mm: add help function to check specific protection flags in range

2018-08-20 Thread Bin Yang
Introduce the needs_static_protections() helper to check specific protection flags in range. It calls static_protection() to check whether any part of the address/len range is forced to change from 'prot'. Suggested-by: Dave Hansen Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 36

[PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-08-20 Thread Bin Yang
-by: Bin Yang --- arch/x86/mm/pageattr.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 8d6c34f..68613fd 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -629,6 +629,22

[PATCH v3 0/5] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-08-20 Thread Bin Yang
kind help. Thanks, Bin Bin Yang (5): x86/mm: avoid redundant checking if pgprot has no change x86/mm: avoid static_protection() checking if not whole large page attr change x86/mm: add help function to check specific protection flags in range x86/mm: optimize static_protection() by us

[PATCH v3 5/5] x86/mm: add WARN_ON_ONCE() for wrong large page mapping

2018-08-20 Thread Bin Yang
-by: Bin Yang --- arch/x86/mm/pageattr.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index fd90c5b..91a250c 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -625,6 +625,7 @@ try_preserve_large_page(pte_t

[PATCH v3 1/5] x86/mm: avoid redundant checking if pgprot has no change

2018-08-20 Thread Bin Yang
-by: Bin Yang --- arch/x86/mm/pageattr.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 8d6c34f..68613fd 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -629,6 +629,22

[PATCH v3 0/5] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-08-20 Thread Bin Yang
kind help. Thanks, Bin Bin Yang (5): x86/mm: avoid redundant checking if pgprot has no change x86/mm: avoid static_protection() checking if not whole large page attr change x86/mm: add help function to check specific protection flags in range x86/mm: optimize static_protection() by us

[PATCH v3 5/5] x86/mm: add WARN_ON_ONCE() for wrong large page mapping

2018-08-20 Thread Bin Yang
-by: Bin Yang --- arch/x86/mm/pageattr.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index fd90c5b..91a250c 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -625,6 +625,7 @@ try_preserve_large_page(pte_t

[PATCH v2] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-07-04 Thread Bin Yang
his patch enhances static_protections() to return the page num that all following pages are in the same overlapping range with same protection flags. It can reduce the check loop from 262144 to less than 10 times. Signed-off-by: Bin Yang --- arch/x86/mm/pageat

[PATCH v2] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-07-04 Thread Bin Yang
his patch enhances static_protections() to return the page num that all following pages are in the same overlapping range with same protection flags. It can reduce the check loop from 262144 to less than 10 times. Signed-off-by: Bin Yang --- arch/x86/mm/pageat

[PATCH] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-06-28 Thread Bin Yang
y to cache the last address which had been checked just now. If the next address is in same big page, the cache will be used without full range check. Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-)

[PATCH] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr

2018-06-28 Thread Bin Yang
y to cache the last address which had been checked just now. If the next address is in same big page, the cache will be used without full range check. Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-)