Re: [PATCH] pinctrl: msm: Use dynamic GPIO numbering

2020-11-08 Thread Arun KS
On Thu, Nov 5, 2020 at 3:46 PM Linus Walleij wrote: > > On Fri, Oct 23, 2020 at 4:21 PM Arun KS wrote: > > > Im only concerned because, after this change, the use of gpio number > > from user space has become a little difficult. > > This makes me a bit puzzled so I nee

Re: [PATCH] pinctrl: msm: Use dynamic GPIO numbering

2020-10-23 Thread Arun KS
On Mon, Jan 29, 2018 at 8:30 AM Bjorn Andersson wrote: > > The base of the TLMM gpiochip should not be statically defined as 0, fix > this to not artificially restrict the existence of multiple pinctrl-msm > devices. Can someone please provide the details why this is needed for pinctrl-msm. Is t

Re: [PATCH v1] arm64: Fix size of __early_cpu_boot_status

2019-05-15 Thread Arun KS
On Wed, May 15, 2019 at 7:20 PM Will Deacon wrote: > > On Wed, May 15, 2019 at 07:13:19PM +0530, Arun KS wrote: > > __early_cpu_boot_status is of type int. Fix up the calls to > > update_early_cpu_boot_status, to use a w register. > > > > Signed-off-by: Arun

[PATCH v1] arm64: Fix size of __early_cpu_boot_status

2019-05-15 Thread Arun KS
__early_cpu_boot_status is of type int. Fix up the calls to update_early_cpu_boot_status, to use a w register. Signed-off-by: Arun KS Acked-by: Mark Rutland --- arch/arm64/include/asm/smp.h | 2 +- arch/arm64/kernel/head.S | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff

Re: arm64: Fix size of __early_cpu_boot_status

2019-04-30 Thread Arun KS
On Tue, Apr 30, 2019 at 4:39 PM Will Deacon wrote: > > On Tue, Apr 30, 2019 at 04:05:04PM +0530, Arun KS wrote: > > __early_cpu_boot_status is of type long. Use quad > > assembler directive to allocate proper size. > > > > Signed-off-by: Arun KS > > -

arm64: Fix size of __early_cpu_boot_status

2019-04-30 Thread Arun KS
__early_cpu_boot_status is of type long. Use quad assembler directive to allocate proper size. Signed-off-by: Arun KS --- arch/arm64/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index eecf792..115f332

[PATCH v11] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-17 Thread Arun KS
providers of online callback to align with the change. Signed-off-by: Arun KS Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: Alexander Duyck --- Changes sinc v10: - Fix check page belong to HAS in hv_ballon.c. - Removed unnecessary brackets. Changes since v9: - Fix condition

[PATCH v10] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-15 Thread Arun KS
providers of online callback to align with the change. Signed-off-by: Arun KS Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: Alexander Duyck --- Changes since v9: - Fix condition check in hv_ballon driver. Changes since v8: - Remove return type change for online_page_callback

Re: [PATCH v9] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-14 Thread Arun KS
On 2019-01-14 21:45, Alexander Duyck wrote: On Mon, 2019-01-14 at 19:29 +0530, Arun KS wrote: On 2019-01-10 21:53, Alexander Duyck wrote: > On Thu, 2019-01-10 at 11:05 +0530, Arun KS wrote: > > When freeing pages are done with higher order, time spent on > > coalescing >

Re: [PATCH v9] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-14 Thread Arun KS
On 2019-01-10 21:53, Alexander Duyck wrote: On Thu, 2019-01-10 at 11:05 +0530, Arun KS wrote: When freeing pages are done with higher order, time spent on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from

[PATCH v9] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
providers of online callback to align with the change. Signed-off-by: Arun KS Acked-by: Michal Hocko Reviewed-by: Oscar Salvador --- Changes since v8: - Remove return type change for online_page_callback. - Use consistent names for external online_page providers. - Fix onlined_pages accounting

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
On 2019-01-10 00:26, Andrew Morton wrote: On Wed, 09 Jan 2019 16:36:36 +0530 Arun KS wrote: On 2019-01-09 16:27, Michal Hocko wrote: > On Wed 09-01-19 16:12:48, Arun KS wrote: > [...] >> It will be called once per online of a section and the arg value is >> always >>

Re: [PATCH v8] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
On 2019-01-09 21:47, Alexander Duyck wrote: On Wed, 2019-01-09 at 16:43 +0530, Arun KS wrote: When freeing pages are done with higher order, time spent on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
On 2019-01-09 21:39, Alexander Duyck wrote: On Wed, 2019-01-09 at 11:51 +0530, Arun KS wrote: On 2019-01-09 03:47, Alexander Duyck wrote: > On Fri, 2019-01-04 at 10:31 +0530, Arun KS wrote: > > When freeing pages are done with higher order, time spent on > > coalescing >

[PATCH v8] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
providers of online callback to align with the change. Signed-off-by: Arun KS Acked-by: Michal Hocko Reviewed-by: Oscar Salvador --- Changes since v7: - Rebased to 5.0-rc1. - Fixed onlined_pages accounting. - Added comment for return value of online_page_callback. - Renamed xen_bring_pgs_online to

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
On 2019-01-09 16:27, Michal Hocko wrote: On Wed 09-01-19 16:12:48, Arun KS wrote: [...] It will be called once per online of a section and the arg value is always set to 0 while entering online_pages_range. You rare right that this will be the case in the most simple scenario. But the point

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
On 2019-01-09 14:10, Michal Hocko wrote: On Wed 09-01-19 13:58:50, Arun KS wrote: On 2019-01-09 13:07, Michal Hocko wrote: > On Wed 09-01-19 11:28:52, Arun KS wrote: > > On 2019-01-08 23:43, Michal Hocko wrote: > > > On Tue 08-01-19 09:56:09, Alexander Duyck wrote: > > &

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-09 Thread Arun KS
On 2019-01-09 13:07, Michal Hocko wrote: On Wed 09-01-19 11:28:52, Arun KS wrote: On 2019-01-08 23:43, Michal Hocko wrote: > On Tue 08-01-19 09:56:09, Alexander Duyck wrote: > > On Fri, 2019-01-04 at 10:31 +0530, Arun KS wrote: > [...] > > > static int online_page

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-08 Thread Arun KS
On 2019-01-09 03:47, Alexander Duyck wrote: On Fri, 2019-01-04 at 10:31 +0530, Arun KS wrote: When freeing pages are done with higher order, time spent on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from

Re: [PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-08 Thread Arun KS
On 2019-01-08 23:43, Michal Hocko wrote: On Tue 08-01-19 09:56:09, Alexander Duyck wrote: On Fri, 2019-01-04 at 10:31 +0530, Arun KS wrote: [...] > static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, >void *arg) > { > - uns

Re: [PATCH v6 1/2] memory_hotplug: Free pages as higher order

2019-01-03 Thread Arun KS
On 2018-11-07 11:51, Arun KS wrote: On 2018-11-07 01:38, Michal Hocko wrote: On Tue 06-11-18 21:01:29, Arun KS wrote: On 2018-11-06 19:36, Michal Hocko wrote: > On Tue 06-11-18 11:33:13, Arun KS wrote: > > When free pages are done with higher order, time spend on > > coalescing

[PATCH v7] mm/page_alloc.c: memory_hotplug: free pages as higher order

2019-01-03 Thread Arun KS
providers of online callback to align with the change. Signed-off-by: Arun KS Acked-by: Michal Hocko Reviewed-by: Oscar Salvador --- Changes since v6: - Rebased to 4.20 - Changelog updated. - No improvement seen on arm64, hence removed removal of prefetch. Changes since v5: - Rebased to 4.20-rc1

[PATCH v5 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-11-12 Thread Arun KS
variables to atomic, with preventing poteintial store-to-read tearing as a bonus. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- coccinelle script to make most of the changes

[PATCH v5 2/4] mm: convert zone->managed_pages to atomic variable

2018-11-12 Thread Arun KS
e lock and convert variables to atomic, with preventing poteintial store-to-read tearing as a bonus. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- Most of the changes are d

[PATCH v5 4/4] mm: Remove managed_page_count spinlock

2018-11-12 Thread Arun KS
ff-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- include/linux/mmzone.h | 6 -- mm/page_alloc.c| 5 - 2 files changed, 11 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index e73dc31..c71b4d9 100644

[PATCH v5 1/4] mm: reference totalram_pages and managed_pages once per function

2018-11-12 Thread Arun KS
ode but it is better to prevent from them in principle. Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- arch/um/kernel/mem.c | 2 +- arch/x86/kernel/cpu/microcode/core.c | 5 +++-- drivers/hv/hv_balloo

[PATCH v5 0/4] mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-12 Thread Arun KS
ch/1011293/#1194248 Changes in v4: - Fixed kbuild test robot error. - Modified changelog. - Rebased to 4.20.-rc2 Changes in v3: - Fixed kbuild test robot errors. - Modified changelogs to be more clear. - EXPORT_SYMBOL for _totalram_pages and _totalhigh_pages. Arun KS (4): mm: reference totalram

Re: [PATCH v4 1/4] mm: reference totalram_pages and managed_pages once per function

2018-11-11 Thread Arun KS
Hello Matthew, Thanks for reviewing. On 2018-11-12 11:43, Matthew Wilcox wrote: On Mon, Nov 12, 2018 at 11:37:46AM +0530, Arun KS wrote: +++ b/arch/um/kernel/mem.c @@ -51,8 +51,7 @@ void __init mem_init(void) /* this will put all low memory onto the freelists

[PATCH v4 1/4] mm: reference totalram_pages and managed_pages once per function

2018-11-11 Thread Arun KS
ode but it is better to prevent from them in principle. Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- arch/um/kernel/mem.c | 3 +-- arch/x86/kernel/cpu/microcode/core.c | 5 +++-- drivers/hv/hv_balloo

[PATCH v4 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-11-11 Thread Arun KS
variables to atomic, with preventing poteintial store-to-read tearing as a bonus. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- coccinelle script to make most of the changes

[PATCH v4 2/4] mm: convert zone->managed_pages to atomic variable

2018-11-11 Thread Arun KS
e lock and convert variables to atomic, with preventing poteintial store-to-read tearing as a bonus. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- Most of the changes ar

[PATCH v4 4/4] mm: Remove managed_page_count spinlock

2018-11-11 Thread Arun KS
ff-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- include/linux/mmzone.h | 6 -- mm/page_alloc.c| 5 - 2 files changed, 11 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index e73dc31..c71b4d9 100644

[PATCH v4 0/4] mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-11 Thread Arun KS
4.20.-rc2 Changes in v3: - Fixed kbuild test robot errors. - Modified changelogs to be more clear. - EXPORT_SYMBOL for _totalram_pages and _totalhigh_pages. Arun KS (4): mm: reference totalram_pages and managed_pages once per function mm: convert zone->managed_pages to atomic variable

Re: [PATCH v3 4/4] mm: Remove managed_page_count spinlock

2018-11-09 Thread Arun KS
On 2018-11-08 15:44, Michal Hocko wrote: On Thu 08-11-18 15:33:06, Arun KS wrote: On 2018-11-08 14:04, Michal Hocko wrote: > On Thu 08-11-18 13:53:18, Arun KS wrote: > > Now totalram_pages and managed_pages are atomic varibles. No need > > of managed_page_count spinlock. &

Re: [PATCH v3 4/4] mm: Remove managed_page_count spinlock

2018-11-08 Thread Arun KS
On 2018-11-08 15:44, Michal Hocko wrote: On Thu 08-11-18 15:33:06, Arun KS wrote: On 2018-11-08 14:04, Michal Hocko wrote: > On Thu 08-11-18 13:53:18, Arun KS wrote: > > Now totalram_pages and managed_pages are atomic varibles. No need > > of managed_page_count spinlock. &

Re: [PATCH v3 4/4] mm: Remove managed_page_count spinlock

2018-11-08 Thread Arun KS
On 2018-11-08 14:04, Michal Hocko wrote: On Thu 08-11-18 13:53:18, Arun KS wrote: Now totalram_pages and managed_pages are atomic varibles. No need of managed_page_count spinlock. As explained earlier. Please add a motivation here. Feel free to reuse wording from http://lkml.kernel.org/r

[PATCH v3 1/4] mm: reference totalram_pages and managed_pages once per function

2018-11-08 Thread Arun KS
ode but it is better to prevent from them in principle. Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko --- arch/um/kernel/mem.c | 3 +-- arch/x86/kernel/cpu/microcode/core.c | 5 +++-- drivers/hv/hv_balloon.c |

[PATCH v3 2/4] mm: convert zone->managed_pages to atomic variable

2018-11-08 Thread Arun KS
onvert totalram_panges, totalhigh_pages and eventually managed_page_count_lock will be removed. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- Main motivation wa

[PATCH v3 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-11-08 Thread Arun KS
totalram_pages and totalhigh_pages are made static inline function. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- coccinelle script to make most of the changes

[PATCH v3 4/4] mm: Remove managed_page_count spinlock

2018-11-08 Thread Arun KS
Now totalram_pages and managed_pages are atomic varibles. No need of managed_page_count spinlock. Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko Acked-by: Vlastimil Babka --- include/linux/mmzone.h | 6 -- mm/page_alloc.c| 5 - 2 files

[PATCH v3 0/4] mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-08 Thread Arun KS
more clear. - EXPORT_SYMBOL for _totalram_pages and _totalhigh_pages. Arun KS (4): mm: reference totalram_pages and managed_pages once per function mm: convert zone->managed_pages to atomic variable mm: convert totalram_pages and totalhigh_pages variables to atomic mm: Remove managed_page_count sp

Re: [PATCH v2 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-11-07 Thread Arun KS
On 2018-11-07 14:34, Vlastimil Babka wrote: On 11/6/18 5:21 PM, Arun KS wrote: totalram_pages and totalhigh_pages are made static inline function. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko

Re: [PATCH v6 1/2] memory_hotplug: Free pages as higher order

2018-11-06 Thread Arun KS
On 2018-11-07 01:38, Michal Hocko wrote: On Tue 06-11-18 21:01:29, Arun KS wrote: On 2018-11-06 19:36, Michal Hocko wrote: > On Tue 06-11-18 11:33:13, Arun KS wrote: > > When free pages are done with higher order, time spend on > > coalescing pages by buddy allocator can b

Re: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-06 Thread Arun KS
On 2018-11-07 05:52, Andrew Morton wrote: On Fri, 26 Oct 2018 16:30:58 +0530 Arun KS wrote: This series convert totalram_pages, totalhigh_pages and zone->managed_pages to atomic variables. The whole point appears to be removal of managed_page_count_lock, yes? Why? What is the value

[PATCH v2 2/4] mm: Convert zone->managed_pages to atomic variable

2018-11-06 Thread Arun KS
onvert totalram_panges, totalhigh_pages and eventually managed_page_count_lock will be removed. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko --- Most of the changes are done by below coccinelle

[PATCH v2 4/4] mm: Remove managed_page_count spinlock

2018-11-06 Thread Arun KS
Now totalram_pages and managed_pages are atomic varibles. No need of managed_page_count spinlock. Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko --- include/linux/mmzone.h | 6 -- mm/page_alloc.c| 5 - 2 files changed, 11 deletions(-) diff

[PATCH v2 0/4] mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-06 Thread Arun KS
This series convert totalram_pages, totalhigh_pages and zone->managed_pages to atomic variables. The patch was comiple tested on x86(x86_64_defconfig & i386_defconfig) on 4.20-rc1. And memory hotplug tested on arm64, but on an older version of kernel. Arun KS (4): mm: Fix multiple evalu

[PATCH v2 1/4] mm: Fix multiple evaluvations of totalram_pages and managed_pages

2018-11-06 Thread Arun KS
This patch is in preparation to a later patch which converts totalram_pages and zone->managed_pages to atomic variables. This patch does not introduce any functional changes. Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov --- arch/um/kernel/mem.c | 3 +-- arch/

[PATCH v2 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-11-06 Thread Arun KS
totalram_pages and totalhigh_pages are made static inline function. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS Reviewed-by: Konstantin Khlebnikov Acked-by: Michal Hocko --- coccinelle script to make most of the changes, @@ declarer name EXPORT_SYMBOL

Re: [PATCH v6 1/2] memory_hotplug: Free pages as higher order

2018-11-06 Thread Arun KS
On 2018-11-06 19:36, Michal Hocko wrote: On Tue 06-11-18 11:33:13, Arun KS wrote: When free pages are done with higher order, time spend on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from 50-60 ms to less

Re: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-06 Thread Arun KS
On 2018-11-06 14:07, Konstantin Khlebnikov wrote: On 06.11.2018 11:30, Arun KS wrote: On 2018-11-06 13:47, Konstantin Khlebnikov wrote: On 06.11.2018 8:38, Arun KS wrote: Any comments? Looks good. Except unclear motivation behind this change. This should be in comment of one of patch

Re: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-06 Thread Arun KS
On 2018-11-06 13:47, Konstantin Khlebnikov wrote: On 06.11.2018 8:38, Arun KS wrote: Any comments? Looks good. Except unclear motivation behind this change. This should be in comment of one of patch. totalram_pages, zone->managed_pages and totalhigh_pages are sometimes modified outs

[PATCH v6 2/2] mm/page_alloc: remove software prefetching in __free_pages_core

2018-11-05 Thread Arun KS
They not only increase the code footprint, they actually make things slower rather than faster. Remove them as contemporary hardware doesn't need any hint. Suggested-by: Dan Williams Signed-off-by: Arun KS --- mm/page_alloc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-)

[PATCH v6 1/2] memory_hotplug: Free pages as higher order

2018-11-05 Thread Arun KS
online callback to align with the change. This patch modifies totalram_pages, zone->managed_pages and totalhigh_pages outside managed_page_count_lock. A follow up series will be send to convert these variable to atomic to avoid readers potentially seeing a store tear. Signed-off-by: Arun

Re: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-11-05 Thread Arun KS
Any comments? Regards, Arun On 2018-10-26 16:30, Arun KS wrote: This series convert totalram_pages, totalhigh_pages and zone->managed_pages to atomic variables. The patch was comiple tested on x86(x86_64_defconfig & i386_defconfig) on tip of linux-mmotm. And memory hotplug tested o

[PATCH v1 1/4] mm: Fix multiple evaluvations of totalram_pages and managed_pages

2018-10-26 Thread Arun KS
This patch is in preparation to a later patch which converts totalram_pages and zone->managed_pages to atomic variables. This patch does not introduce any functional changes. Signed-off-by: Arun KS --- arch/um/kernel/mem.c | 3 +-- arch/x86/kernel/cpu/microcode/core.c |

[PATCH v1 4/4] mm: Remove managed_page_count spinlock

2018-10-26 Thread Arun KS
Now totalram_pages and managed_pages are atomic varibles. No need of managed_page_count spinlock. Signed-off-by: Arun KS --- include/linux/mmzone.h | 6 -- mm/page_alloc.c| 5 - 2 files changed, 11 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index

[PATCH v1 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-10-26 Thread Arun KS
totalram_pages and totalhigh_pages are made static inline function. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS --- coccinelle script to make most of the changes, @@ declarer name EXPORT_SYMBOL; symbol totalram_pages; expression e; @@ ( EXPORT_SYMBOL

[PATCH v1 2/4] mm: Convert zone->managed_pages to atomic variable

2018-10-26 Thread Arun KS
managed_page_count_lock will be removed in subsequent patch after totalram_pages and totalhigh_pages are converted to atomic. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS --- Most of the changes are done by below coccinelle script, @@ struct zone *z

[PATCH v1 4/4] mm: Remove managed_page_count spinlock

2018-10-26 Thread Arun KS
Now totalram_pages and managed_pages are atomic varibles. No need of managed_page_count spinlock. Signed-off-by: Arun KS --- include/linux/mmzone.h | 6 -- mm/page_alloc.c| 5 - 2 files changed, 11 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index

[PATCH v1 2/4] mm: Convert zone->managed_pages to atomic variable

2018-10-26 Thread Arun KS
managed_page_count_lock will be removed in subsequent patch after totalram_pages and totalhigh_pages are converted to atomic. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS --- Most of the changes are done by below coccinelle script, @@ struct zone *z

[PATCH v1 1/4] mm: Fix multiple evaluvations of totalram_pages and managed_pages

2018-10-26 Thread Arun KS
This patch is in preparation to a later patch which converts totalram_pages and zone->managed_pages to atomic variables. This patch does not introduce any functional changes. Signed-off-by: Arun KS --- arch/um/kernel/mem.c | 3 +-- arch/x86/kernel/cpu/microcode/core.c |

[PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-10-26 Thread Arun KS
This series convert totalram_pages, totalhigh_pages and zone->managed_pages to atomic variables. The patch was comiple tested on x86(x86_64_defconfig & i386_defconfig) on tip of linux-mmotm. And memory hotplug tested on arm64, but on an older version of kernel. Arun KS (4): mm: Fix m

[PATCH v1 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic

2018-10-26 Thread Arun KS
totalram_pages and totalhigh_pages are made static inline function. Suggested-by: Michal Hocko Suggested-by: Vlastimil Babka Signed-off-by: Arun KS --- coccinelle script to make most of the changes, @@ declarer name EXPORT_SYMBOL; symbol totalram_pages; expression e; @@ ( EXPORT_SYMBOL

[PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic

2018-10-26 Thread Arun KS
This series convert totalram_pages, totalhigh_pages and zone->managed_pages to atomic variables. The patch was comiple tested on x86(x86_64_defconfig & i386_defconfig) on tip of linux-mmotm. And memory hotplug tested on arm64, but on an older version of kernel. Arun KS (4): mm: Fix m

Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic.

2018-10-24 Thread Arun KS
PM Michal Hocko wrote: > > > > On Mon 22-10-18 22:53:22, Arun KS wrote: > > > Remove managed_page_count_lock spinlock and instead use atomic > > > variables. > > > > Hello Michal, > > I assume this has been auto-generated. If yes, it would be better to

Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic.

2018-10-23 Thread Arun KS
On 2018-10-24 01:34, Kees Cook wrote: On Mon, Oct 22, 2018 at 10:11 PM, Konstantin Khlebnikov wrote: On 23.10.2018 7:15, Joe Perches wrote:> On Mon, 2018-10-22 at 22:53 +0530, Arun KS wrote: Remove managed_page_count_lock spinlock and instead use atomic variables. Perhaps better to def

Re: [PATCH v2] memory_hotplug: Free pages as higher order

2018-09-26 Thread Arun KS
On 2018-09-25 23:48, Michal Hocko wrote: On Tue 25-09-18 11:59:09, Vlastimil Babka wrote: [...] This seems like almost complete copy of __free_pages_boot_core(), could you do some code reuse instead? I think Michal Hocko also suggested that. Yes, please try to reuse as much code as possible

Re: [PATCH] memory_hotplug: Free pages as higher order

2018-09-24 Thread Arun KS
On 2018-09-21 21:12, Dan Williams wrote: On Fri, Sep 21, 2018 at 2:40 AM Arun KS wrote: When free pages are done with higher order, time spend on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from 50-60 ms

Re: [RFC] memory_hotplug: Free pages as pageblock_order

2018-09-18 Thread Arun KS
On 2018-09-14 14:40, Michal Hocko wrote: On Wed 12-09-18 20:12:30, Arun KS wrote: On 2018-09-12 18:47, Michal Hocko wrote: > On Wed 12-09-18 22:57:43, Balbir Singh wrote: > > On Wed, Sep 12, 2018 at 12:38:53PM +0200, Michal Hocko wrote: > > > On Wed 12-09-18 14:56

Re: [RFC] memory_hotplug: Free pages as pageblock_order

2018-09-12 Thread Arun KS
On 2018-09-12 18:47, Michal Hocko wrote: On Wed 12-09-18 22:57:43, Balbir Singh wrote: On Wed, Sep 12, 2018 at 12:38:53PM +0200, Michal Hocko wrote: > On Wed 12-09-18 14:56:45, Arun KS wrote: > > When free pages are done with pageblock_order, time spend on > > coalescing

Re: [RFC] memory_hotplug: Free pages as pageblock_order

2018-09-12 Thread Arun KS
Hello Michal and Balbir, Thanks for reviewing. On 2018-09-12 18:27, Balbir Singh wrote: On Wed, Sep 12, 2018 at 12:38:53PM +0200, Michal Hocko wrote: On Wed 12-09-18 14:56:45, Arun KS wrote: > When free pages are done with pageblock_order, time spend on > coalescing pages by buddy all

[RFC] memory_hotplug: Free pages as pageblock_order

2018-09-12 Thread Arun KS
27;ll modify users of set_online_page_callback and resend clean patch. Signed-off-by: Arun KS --- include/linux/memory_hotplug.h | 1 + mm/memory_hotplug.c| 52 -- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/include/

Re: [PATCH v2 1/5] mm: memory_hotplug: Memory hotplug (add) support for arm64

2017-11-25 Thread Arun KS
On Fri, Nov 24, 2017 at 4:23 PM, Maciej Bielski wrote: > On Fri, Nov 24, 2017 at 09:42:33AM +, Andrea Reale wrote: >> Hi Arun, >> >> >> On Fri 24 Nov 2017, 11:25, Arun KS wrote: >> > On Thu, Nov 23, 2017 at 4:43 PM, Maciej Bielski >> > wrote:

Re: [PATCH v2 1/5] mm: memory_hotplug: Memory hotplug (add) support for arm64

2017-11-23 Thread Arun KS
On Thu, Nov 23, 2017 at 4:43 PM, Maciej Bielski wrote: > Introduces memory hotplug functionality (hot-add) for arm64. > > Changes v1->v2: > - swapper pgtable updated in place on hot add, avoiding unnecessary copy: > all changes are additive and non destructive. > > - stop_machine used to updated

Why linux console designed to work in polling mode?

2015-07-21 Thread Arun KS
forwarding email to LKML. Please enlighten on this question. Googling doesn't helped so far. Thanks, Arun From: Alexander Date: Sat, Jul 18, 2015 at 11:23 AM Subject: Delegating printk work to UART interrupt To: kernelnewb...@kernelnewbies.org Hi! When i checked how kernel printing works, i me

Re: [RCU] kernel hangs in wait_rcu_gp during suspend path

2014-12-19 Thread Arun KS
Hi Paul, On Fri, Dec 19, 2014 at 1:35 AM, Paul E. McKenney wrote: > On Thu, Dec 18, 2014 at 09:52:28PM +0530, Arun KS wrote: >> Hi Paul, >> >> On Thu, Dec 18, 2014 at 12:54 AM, Paul E. McKenney >> wrote: >> > On Tue, Dec 16, 2014 at 11:00:20

Re: [RCU] kernel hangs in wait_rcu_gp during suspend path

2014-12-18 Thread Arun KS
Hi Paul, On Thu, Dec 18, 2014 at 12:54 AM, Paul E. McKenney wrote: > On Tue, Dec 16, 2014 at 11:00:20PM +0530, Arun KS wrote: >> Hello, >> >> Adding some more info. >> >> Below is the rcu_data data structure corresponding to cpu4. > > This shows that

Re: [RCU] kernel hangs in wait_rcu_gp during suspend path

2014-12-16 Thread Arun KS
llnode = { next = 0x0 }, func = 0xc0195aa8 } } Hope this helps. Thanks, Arun On Tue, Dec 16, 2014 at 11:59 AM, Arun KS wrote: > Hello, > > I dig little deeper to understand the situation. > All other cpus are in idle thread already. > As per my understanding, for

Re: [RCU] kernel hangs in wait_rcu_gp during suspend path

2014-12-15 Thread Arun KS
Thanks, Arun On Mon, Dec 15, 2014 at 10:34 PM, Arun KS wrote: > Hi, > > Here is the backtrace of the process hanging in wait_rcu_gp, > > PID: 247TASK: e16e7380 CPU: 4 COMMAND: "kworker/u16:5" > #0 [] (__schedule) from [] > #1 [] (schedule_timeout) from

[RCU] kernel hangs in wait_rcu_gp during suspend path

2014-12-15 Thread Arun KS
Hi, Here is the backtrace of the process hanging in wait_rcu_gp, PID: 247TASK: e16e7380 CPU: 4 COMMAND: "kworker/u16:5" #0 [] (__schedule) from [] #1 [] (schedule_timeout) from [] #2 [] (wait_for_common) from [] #3 [] (wait_rcu_gp) from [] #4 [] (atomic_notifier_chain_unregister) from

Re: [Workqueue] crash in process_one_work

2014-10-08 Thread Arun KS
Hello Tejun, On Mon, Oct 6, 2014 at 9:02 PM, Tejun Heo wrote: > Hello, Arun. > > On Mon, Sep 29, 2014 at 09:40:50PM +0530, Arun KS wrote: > ... >> The value of data is 0xffe0, which is basically the value after an >> INIT_WORK() or WORK_DATA_INIT(). >> Thi

[Workqueue] crash in process_one_work

2014-09-29 Thread Arun KS
Hello Tejun/Lai, I am seeing the following crash in 3.10.49 kernel. [ 1133.893817] Unable to handle kernel NULL pointer dereference at virtual address 0004 [ 1133.893821] pgd = c0004000 [ 1133.893827] [0004] *pgd= [ 1133.893834] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 1133.

[3.10.49 stable kernel] crash in process_one_work

2014-09-26 Thread Arun KS
Hello Tejun, I m seen the following crash in 3.10 kernel workqueue. [ 1133.893817] Unable to handle kernel NULL pointer dereference at virtual address 0004 [ 1133.893821] pgd = c0004000 [ 1133.893827] [0004] *pgd= [ 1133.893834] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 1133.

Re: [PATCH V3] irqchip:gic: change access of gicc_ctrl register to read modify write.

2014-09-09 Thread Arun KS
xf0, cpu_base + GIC_CPU_PRIMASK); >>>> - writel_relaxed(1, cpu_base + GIC_CPU_CTRL); >>>> + >>>> + ctrl_mask = readl(cpu_base + GIC_CPU_CTRL); >>> >>> readl_relaxed() here? >> Trying to make sure read is completed before write

[PATCH] printk: flush conflicting continuation line

2014-01-01 Thread Arun KS
>From d751f9a0cb6329ae3171f6e1cb85e4a3aa792d73 Mon Sep 17 00:00:00 2001 From: Arun KS Date: Wed, 1 Jan 2014 17:24:46 +0530 Subject: printk: flush conflicting continuation line An earlier newline was missing and current print is from different task. In this scenario flush the continuation l

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Arun KS
/* these dentries are never renamed, so d_lock is not needed */ > if (prepend(&end, &buflen, " (deleted)", 11) || > prepend_name(&end, &buflen, &dentry->d_name) || > prepend(&end, &buflen, "/", 1)) > end = ERR_PT

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Arun KS
Hi Al Viro, On Tue, Aug 20, 2013 at 1:06 PM, Al Viro wrote: > On Tue, Aug 20, 2013 at 12:51:56PM +0530, Arun KS wrote: > >> d_path expects the pathname to be less than 64 bytes. If its more than >> 64, it returns -ENAMETOOLONG. > > ?!?!? d_path() does not expect anythi

Re: [PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-20 Thread Arun KS
Hi Al Viro, On Tue, Aug 20, 2013 at 11:21 AM, Al Viro wrote: > On Tue, Aug 20, 2013 at 10:55:40AM +0530, Arun KS wrote: >> >From 932a134abeac597f18c86c513704709ad154994b Mon Sep 17 00:00:00 2001 >> From: Arun KS >> Date: Mon, 19 Aug 2013 12:06:33 +0530 >> S

[PATCH v1] seq_file: Fix overflow condition in seq_commit

2013-08-19 Thread Arun KS
>From 932a134abeac597f18c86c513704709ad154994b Mon Sep 17 00:00:00 2001 From: Arun KS Date: Mon, 19 Aug 2013 12:06:33 +0530 Subject: seq_file: Fix overflow condition in seq_commit seq_path()/seq_commit() is treating a d_path() failure as an overflow condition, but it isn't. seq_read

Re: [PATCH] SeqFile: Fix overflow condition

2013-08-19 Thread Arun KS
Hi Andrew, On Tue, Aug 20, 2013 at 4:35 AM, Andrew Morton wrote: > On Mon, 19 Aug 2013 17:02:37 +0530 Arun KS wrote: > >> seq_path()/seq_commit() is treating a d_path() failure as an overflow >> condition, but it isn't. > > This is too brief. When fixing a bug plea

[PATCH] SeqFile: Fix overflow condition

2013-08-19 Thread Arun KS
>From 27f50827e5e81f2a30544b72c1d54c3ee86835cf Mon Sep 17 00:00:00 2001 From: Arun KS Date: Mon, 19 Aug 2013 12:06:33 +0530 Subject: SeqFile: Fix overflow condition seq_path()/seq_commit() is treating a d_path() failure as an overflow condition, but it isn't. Signed-off-by: Arun KS

Re: [PATCH] SeqFile: Fix overflow condition

2013-08-19 Thread Arun KS
Please ignore this patch. I ll send an updated one. Thanks, Arun On Mon, Aug 19, 2013 at 12:25 PM, Arun KS wrote: > From 23986a85b9efe7bc3ffc0887b8d17cdf2fbab4f2 Mon Sep 17 00:00:00 2001 > From: Arun KS > Date: Mon, 19 Aug 2013 12:06:33 +0530 > Subject: SeqFile: Fix overfl

[PATCH] SeqFile: Fix overflow condition

2013-08-18 Thread Arun KS
>From 23986a85b9efe7bc3ffc0887b8d17cdf2fbab4f2 Mon Sep 17 00:00:00 2001 From: Arun KS Date: Mon, 19 Aug 2013 12:06:33 +0530 Subject: SeqFile: Fix overflow condition seq_path()/seq_commit() is treating a d_path() failure as an overflow condition, but it isn't. Signed-off-by: Arun KS

Re: Seq File: Return error if d_path fails

2013-08-18 Thread Arun KS
Hi Andrew, On Tue, Aug 13, 2013 at 3:19 AM, Andrew Morton wrote: > On Thu, 8 Aug 2013 19:03:31 +0530 Arun KS wrote: > >> >From 2558382c8a030f7261e47977ac62412cd78e6d38 Mon Sep 17 00:00:00 2001 >> From: Arun KS >> Date: Thu, 8 Aug 2013 18:23:04 +0530 >> Subject:

Seq File: Return error if d_path fails

2013-08-08 Thread Arun KS
>From 2558382c8a030f7261e47977ac62412cd78e6d38 Mon Sep 17 00:00:00 2001 From: Arun KS Date: Thu, 8 Aug 2013 18:23:04 +0530 Subject: Seq File: Return error if d_path fails Return error if d_path fails in seq_path funciton. If we do not return from here, seq_commit sets seq_file state as overf