Re: [PATCH] mm/userfaultfd: fix memory corruption due to writeprotect

2021-01-12 Thread Vinayak Menon
On 1/5/2021 9:07 PM, Peter Zijlstra wrote: On Mon, Dec 21, 2020 at 08:16:11PM -0800, Linus Torvalds wrote: So I think the basic rule is that "if you hold mmap_sem for writing, you're always safe". And that really should be considered the "default" locking. ANY time you make a modification to t

Re: [PATCH 6/7] psi: pressure stall information for CPU, memory, and IO

2018-05-23 Thread Vinayak Menon
On 5/23/2018 6:47 PM, Johannes Weiner wrote: > On Wed, May 09, 2018 at 04:33:24PM +0530, Vinayak Menon wrote: >> On 5/8/2018 2:31 AM, Johannes Weiner wrote: >>> + /* Kick the stats aggregation worker if it's gone to sleep */ >>> + if (!delayed_work_pending(&am

Re: [PATCH v10 18/25] mm: provide speculative fault infrastructure

2018-05-15 Thread vinayak menon
On Tue, Apr 17, 2018 at 8:03 PM, Laurent Dufour wrote: > > +#ifdef CONFIG_SPECULATIVE_PAGE_FAULT > + > +#ifndef __HAVE_ARCH_PTE_SPECIAL > +/* This is required by vm_normal_page() */ > +#error "Speculative page fault handler requires __HAVE_ARCH_PTE_SPECIAL" > +#endif > + > +/* > + * vm_normal_page

Re: [PATCH v10 06/25] mm: make pte_unmap_same compatible with SPF

2018-05-10 Thread vinayak menon
On Tue, Apr 17, 2018 at 8:03 PM, Laurent Dufour wrote: > pte_unmap_same() is making the assumption that the page table are still > around because the mmap_sem is held. > This is no more the case when running a speculative page fault and > additional check must be made to ensure that the final page

Re: [PATCH 6/7] psi: pressure stall information for CPU, memory, and IO

2018-05-09 Thread Vinayak Menon
*/ > + if (!delayed_work_pending(&group->clock_work)) This causes a crash when the work is scheduled before system_wq is up. In my case when the first schedule was called from kthreadd. And I had to do this to make it work. if (keventd_up() && !delayed_work_pending(&group->clock_work)) > + schedule_delayed_work(&group->clock_work, MY_LOAD_FREQ); > +} > + > +void psi_task_change(struct task_struct *task, u64 now, int clear, int set) > +{ > + struct cgroup *cgroup, *parent; unused variables Thanks, Vinayak

Re: [PATCH 1/3] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES

2018-04-13 Thread vinayak menon
r in a variable that's not directly exposed via /proc/vmstat, >> >> and then when printing nr_slab_reclaimable, simply add the value >> >> (divided by PAGE_SIZE), and when printing nr_slab_unreclaimable, >> >> subtract the same value. This way we would be simply making the existing >> >> counters more precise, in line with their semantics. >> > >> > Idk, I don't like the idea of adding a counter outside of the vm counters >> > infrastructure, and I definitely wouldn't touch the exposed >> > nr_slab_reclaimable and nr_slab_unreclaimable fields. >> >> We would be just making the reported values more precise wrt reality. > > It depends on if we believe that only slab memory can be reclaimable > or not. If yes, this is true, otherwise not. > > My guess is that some drivers (e.g. networking) might have buffers, > which are reclaimable under mempressure, and are allocated using > the page allocator. But I have to look closer... > One such case I have encountered is that of the ION page pool. The page pool registers a shrinker. When not in any memory pressure page pool can go high and thus cause an mmap to fail when OVERCOMMIT_GUESS is set. I can send a patch to account ION page pool pages in NR_INDIRECTLY_RECLAIMABLE_BYTES. Thanks, Vinayak

Re: [PATCHv2 08/14] mm/page_ext: Drop definition of unused PAGE_EXT_DEBUG_POISON

2018-03-28 Thread Vinayak Menon
On 3/28/2018 10:25 PM, Kirill A. Shutemov wrote: > After bd33ef368135 ("mm: enable page poisoning early at boot") > PAGE_EXT_DEBUG_POISON is not longer used. Remove it. > > Signed-off-by: Kirill A. Shutemov > Cc: Vinayak Menon > --- > include/linux/page_ext.h | 1

Re: [PATCH 1/1] stackdepot: interface to check entries and size of stackdepot.

2017-11-27 Thread Vinayak Menon
ble it is to configure it dynamically, but I think a hash_size early param and then a memblock alloc of stack table at boot would work and help low ram devices. Thanks, Vinayak

Re: Detecting page cache trashing state

2017-10-25 Thread vinayak menon
On Thu, Sep 28, 2017 at 9:19 PM, Ruslan Ruslichenko -X (rruslich - GLOBALLOGIC INC at Cisco) wrote: > Hi Johannes, > > Hopefully I was able to rebase the patch on top v4.9.26 (latest supported > version by us right now) > and test a bit. > The overall idea definitely looks promising, although I ha

Re: [PATCH] Revert "mm: vmpressure: fix sending wrong events on underflow"

2017-06-06 Thread vinayak menon
408faa58d0485002c110eb2454740c. >> >> >> >> THP lru page is reclaimed , THP is split to normal page and loop again. >> >> reclaimed pages should not be bigger than nr_scan. because of each >> >> loop will increase nr_scan counter. >> > Unfortu

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-22 Thread Vinayak Menon
On 3/20/2017 8:53 PM, Johannes Weiner wrote: > On Mon, Mar 20, 2017 at 07:28:53PM +0530, Vinayak Menon wrote: >> From the discussions @ https://lkml.org/lkml/2017/3/3/752, I assume you are >> trying >> per-app memcg. We were trying to implement per app memory cgroups and were

Re: [RFC 1/1] mm, memcg: add prioritized reclaim

2017-03-20 Thread vinayak menon
On Sat, Mar 18, 2017 at 4:46 AM, Tim Murray wrote: > When a system is under memory pressure, it may be beneficial to prioritize > some memory cgroups to keep their pages resident ahead of other cgroups' > pages. Add a new interface to memory cgroups, memory.priority, that enables > kswapd and dire

Re: [RFC 0/1] add support for reclaiming priorities per mem cgroup

2017-03-20 Thread Vinayak Menon
On Fri, Mar 17, 2017 at 04:16:35PM -0700, Tim Murray wrote: Hi Tim, >> Hi all, >> >> I've been working to improve Android's memory management and drop >> lowmemorykiller from the kernel, and I'd like to get some feedback on a >> small patch with a lot of side effects. >> >> Currently, when an

[PATCH v6] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-23 Thread Vinayak Menon
nkers from shrink_zone()") Link: http://lkml.kernel.org/r/1486641577-11685-2-git-send-email-vinme...@codeaurora.org Acked-by: Minchan Kim Signed-off-by: Vinayak Menon Cc: Johannes Weiner Cc: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Rik van Riel Cc: Vladimir Davydov Cc: Anton Voront

Re: [PATCH 2/2 v5] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-10 Thread vinayak menon
On Thu, Feb 9, 2017 at 5:50 PM, Michal Hocko wrote: > On Thu 09-02-17 17:29:37, Vinayak Menon wrote: >> During global reclaim, the nr_reclaimed passed to vmpressure includes the >> pages reclaimed from slab. But the corresponding scanned slab pages is >> not passed. Ther

[PATCH 2/2 v5] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-09 Thread Vinayak Menon
s: 6b4f7799c6a5 ("mm: vmscan: invoke slab shrinkers from shrink_zone()") Acked-by: Minchan Kim Cc: Johannes Weiner Cc: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Rik van Riel Cc: Vladimir Davydov Cc: Anton Vorontsov Cc: Shiraz Hashim Signed-off-by: Vinayak Menon --- v5: Mo

[PATCH 1/2 v2] mm: vmpressure: fix sending wrong events on underflow

2017-02-09 Thread Vinayak Menon
a corresponding increment to scanned pages. Minchan Kim mentioned that this can also happen in the case of a THP page where the scanned is 1 and reclaimed could be 512. Acked-by: Minchan Kim Signed-off-by: Vinayak Menon --- v2: Adding a comment and reordering the patches as per Michal&#

Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-07 Thread vinayak menon
On Tue, Feb 7, 2017 at 5:47 PM, Michal Hocko wrote: > On Tue 07-02-17 16:39:15, vinayak menon wrote: >> On Tue, Feb 7, 2017 at 1:40 PM, Michal Hocko wrote: >> > On Mon 06-02-17 20:40:10, vinayak menon wrote: >> >> On Mon, Feb 6, 2017 at 6:22 PM, Michal Hocko wrot

Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow

2017-02-07 Thread vinayak menon
On Mon, Feb 6, 2017 at 8:42 PM, Michal Hocko wrote: > On Mon 06-02-17 20:05:21, vinayak menon wrote: > [...] >> By scan I meant pages scanned by shrink_node_memcg/shrink_list >> which is passed as nr_scanned to vmpressure. The calculation of >> pressure for tr

Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-07 Thread vinayak menon
On Tue, Feb 7, 2017 at 1:40 PM, Michal Hocko wrote: > On Mon 06-02-17 20:40:10, vinayak menon wrote: >> On Mon, Feb 6, 2017 at 6:22 PM, Michal Hocko wrote: >> > On Mon 06-02-17 17:54:09, Vinayak Menon wrote: >> >> During global reclaim, the nr_reclaimed pas

Re: [PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-06 Thread vinayak menon
On Mon, Feb 6, 2017 at 6:22 PM, Michal Hocko wrote: > On Mon 06-02-17 17:54:09, Vinayak Menon wrote: >> During global reclaim, the nr_reclaimed passed to vmpressure includes the >> pages reclaimed from slab. But the corresponding scanned slab pages is >> not passed.

Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow

2017-02-06 Thread vinayak menon
On Mon, Feb 6, 2017 at 6:54 PM, Michal Hocko wrote: > On Mon 06-02-17 18:39:03, vinayak menon wrote: >> On Mon, Feb 6, 2017 at 6:10 PM, Michal Hocko wrote: >> > On Mon 06-02-17 17:54:10, Vinayak Menon wrote: >> > [...] >> >> diff --git a/mm/vmpressure.

Re: [PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow

2017-02-06 Thread vinayak menon
On Mon, Feb 6, 2017 at 6:10 PM, Michal Hocko wrote: > On Mon 06-02-17 17:54:10, Vinayak Menon wrote: > [...] >> diff --git a/mm/vmpressure.c b/mm/vmpressure.c >> index 149fdf6..3281b34 100644 >> --- a/mm/vmpressure.c >> +++ b/mm/vmpressure.c >> @@ -112,8 +112

[PATCH 2/2 RESEND] mm: vmpressure: fix sending wrong events on underflow

2017-02-06 Thread Vinayak Menon
a corresponding increment to scanned pages. Minchan Kim mentioned that this can also happen in the case of a THP page where the scanned is 1 and reclaimed could be 512. Acked-by: Minchan Kim Signed-off-by: Vinayak Menon --- mm/vmpressure.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH 1/2 v4] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-06 Thread Vinayak Menon
es Weiner Cc: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Rik van Riel Cc: Vladimir Davydov Cc: Anton Vorontsov Cc: Shiraz Hashim Signed-off-by: Vinayak Menon --- mm/vmscan.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan

Re: [PATCH 1/2 v3] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-06 Thread vinayak menon
On Fri, Feb 3, 2017 at 8:29 PM, Michal Hocko wrote: > On Fri 03-02-17 10:56:42, vinayak menon wrote: >> On Thu, Feb 2, 2017 at 9:31 PM, Michal Hocko wrote: >> > >> > Why would you like to chose and kill a task when the slab reclaim can >> > still make suffi

Re: [PATCH 1/2 v3] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-02 Thread vinayak menon
On Thu, Feb 2, 2017 at 9:31 PM, Michal Hocko wrote: > > Why would you like to chose and kill a task when the slab reclaim can > still make sufficient progres? Are you sure that the slab contribution > to the stats makes all the above happening? > I agree that a task need not be killed if sufficien

Re: [PATCH 1/2 v3] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-02 Thread vinayak menon
On Thu, Feb 2, 2017 at 5:22 PM, Michal Hocko wrote: > On Thu 02-02-17 16:55:49, vinayak menon wrote: >> On Thu, Feb 2, 2017 at 4:18 PM, Michal Hocko wrote: >> > On Thu 02-02-17 11:44:22, Michal Hocko wrote: >> >> On Tue 31-01-17 14:32:08, Vinayak Menon wrote: >

Re: [PATCH 1/2 v3] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-02 Thread vinayak menon
On Thu, Feb 2, 2017 at 4:14 PM, Michal Hocko wrote: > > We usually refer to the culprit comment as > Fixes: 6b4f7799c6a5 ("mm: vmscan: invoke slab shrinkers from shrink_zone()") > Thanks for pointing that out Michal. I see that added to the version of patch in mmotm. > To unsubscribe, send a mes

Re: [PATCH 1/2 v3] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-02-02 Thread vinayak menon
On Thu, Feb 2, 2017 at 4:18 PM, Michal Hocko wrote: > On Thu 02-02-17 11:44:22, Michal Hocko wrote: >> On Tue 31-01-17 14:32:08, Vinayak Menon wrote: >> > During global reclaim, the nr_reclaimed passed to vmpressure >> > includes the pages reclaimed from slab. But the

[PATCH 1/2 v3] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-01-31 Thread Vinayak Menon
Also, not every shrinker accounts the pages it reclaims. This is a regression introduced by commit 6b4f7799c6a5 ("mm: vmscan: invoke slab shrinkers from shrink_zone()"). Signed-off-by: Vinayak Menon --- mm/vmscan.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-

Re: [PATCH 1/2 v2] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-01-30 Thread vinayak menon
On Tue, Jan 31, 2017 at 5:26 AM, Minchan Kim wrote: > On Fri, Jan 27, 2017 at 01:43:36PM +0530, Vinayak Menon wrote: >> It is noticed that during a global reclaim the memory >> reclaimed via shrinking the slabs can sometimes result >> in reclaimed pages being greater than th

[PATCH 2/2] mm: vmpressure: fix sending wrong events on underflow

2017-01-27 Thread Vinayak Menon
a corresponding increment to scanned pages. Minchan Kim mentioned that this can also happen in the case of a THP page where the scanned is 1 and reclaimed could be 512. Signed-off-by: Vinayak Menon --- mm/vmpressure.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm

[PATCH 1/2 v2] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-01-27 Thread Vinayak Menon
: Vinayak Menon --- mm/vmscan.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 947ab6f..37c4486 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2594,16 +2594,16 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc

Re: [PATCH] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-01-27 Thread vinayak menon
h is heavy-handed work. > Looking at the code, the slab reclaimed pages started getting passed to vmpressure after the commit ("mm: vmscan: invoke slab shrinkers from shrink_zone()"). But as you said, this may be helpful for slab intensive workloads. But in its current form I think it results in incorrect vmpressure reporting because of not accounting the slab scanned pages. Resending the patch with a modified commit msg since the underflow issue is fixed separately. Thanks Minchan. Vinayak

Re: [PATCH] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-01-25 Thread vinayak menon
Hi Minchan On Thu, Jan 26, 2017 at 4:57 AM, Minchan Kim wrote: > Hello Vinayak, > > On Wed, Jan 25, 2017 at 05:08:38PM +0530, Vinayak Menon wrote: >> It is noticed that during a global reclaim the memory >> reclaimed via shrinking the slabs can sometimes result >&g

[PATCH] mm: vmscan: do not pass reclaimed slab to vmpressure

2017-01-25 Thread Vinayak Menon
in a critical event being sent to root cgroup. Fix this by not passing the reclaimed slab count to vmpressure, with the assumption that vmpressure should show the actual pressure on LRU which is now diluted by adding reclaimed slab without a corresponding scanned value. Signed-off-by: Vinayak Menon

Re: [linux-mm] Drastic increase in application memory usage with Kernel version upgrade

2016-08-10 Thread vinayak menon
gt; And, we already have this patch: > /* > mm: do not call do_fault_around for non-linear fault > Ingo Korb reported that "repeated mapping of the same file on tmpfs > using remap_file_pages sometimes triggers a BUG at mm/filemap.c:202 when > the process exits". > He bisected the bug to d7c1755179b8 ("mm: implement ->map_pages for > shmem/tmpfs"), although the bug was actually added by commit > 8c6e50b0290c ("mm: introduce vm_ops->map_pages()"). > */ > > So, I guess, reverting this patch (8c6e50b0290c), is not required ? > But, still we have memory usage issue. > I had observed the PSS increase with 3.18, and that was because of the faultaround patch which MInchan mentioned. Without reverting the patch you can just try reducing fault_around_bytes (mm/memory.c) to PAGE_SIZE. That should bring down the PSS. Thanks, Vinayak

Re: [PATCH v1 3/3] mm: per-process reclaim

2016-06-17 Thread Vinayak Menon
On 6/17/2016 12:54 PM, Balbir Singh wrote: > > On 14/06/16 01:06, Johannes Weiner wrote: >> Hi Minchan, >> >> On Mon, Jun 13, 2016 at 04:50:58PM +0900, Minchan Kim wrote: >>> These day, there are many platforms available in the embedded market >>> and sometime, they has more hints about workingset

Re: [PATCH v1 0/3] per-process reclaim

2016-06-15 Thread Vinayak Menon
On 6/15/2016 6:27 AM, Minchan Kim wrote: > > Yeb, I read Johannes's thread which suggests one-cgroup-per-app model. > It does make sense to me. It is worth to try although I guess it's not > easy to control memory usage on demand, not proactively. > If we can do, maybe we don't need per-process re

Re: [PATCH v1 0/3] per-process reclaim

2016-06-13 Thread Vinayak Menon
it be possible to implement the same using per task memcg by setting the limits and swappiness in such a way that it results inthe same thing that per process reclaim does ? Thanks, Vinayak

Re: [PATCH] mm: make fault_around_bytes configurable

2016-04-25 Thread Vinayak Menon
On 4/22/2016 3:14 PM, Kirill A. Shutemov wrote: > On Fri, Apr 22, 2016 at 02:15:08PM +0530, Vinayak Menon wrote: >> On 04/22/2016 05:31 AM, Andrew Morton wrote: >>> On Mon, 18 Apr 2016 20:47:16 +0530 Vinayak Menon >>> wrote: >>> >>>> Mapping

Re: [PATCH] mm: make fault_around_bytes configurable

2016-04-22 Thread Vinayak Menon
On 04/22/2016 05:31 AM, Andrew Morton wrote: On Mon, 18 Apr 2016 20:47:16 +0530 Vinayak Menon wrote: Mapping pages around fault is found to cause performance degradation in certain use cases. The test performed here is launch of 10 apps one by one, doing something with the app each time, and

[PATCH] mm: make fault_around_bytes configurable

2016-04-18 Thread Vinayak Menon
more pressure on reclaim because of the presence of more mapped pages, resulting in more IO activity, more faults, more swapping, and allocstalls. Make fault_around_bytes configurable so that it can be tuned to avoid performance degradation. Signed-off-by: Vinayak Menon --- mm/Kconfig | 10

[PATCH] of: alloc anywhere from memblock if range not specified

2016-02-22 Thread Vinayak Menon
, for e.g. CMA. Let __memblock_alloc_base allocate from anywhere in memory if limits are not specified. Acked-by: Marek Szyprowski Signed-off-by: Vinayak Menon --- drivers/of/of_reserved_mem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/of/of_reserved_mem.c b

Re: [PATCH] mm/vmstat: retrieve more accurate vmstat value

2015-11-25 Thread vinayak menon
On Thu, Nov 26, 2015 at 7:26 AM, Joonsoo Kim wrote: > On Wed, Nov 25, 2015 at 01:00:22PM +0100, Michal Hocko wrote: >> On Tue 24-11-15 15:22:03, Joonsoo Kim wrote: >> > When I tested compaction in low memory condition, I found that >> > my benchmark is stuck in congestion_wait() at shrink_inactive

Re: [PATCH] libata: enable LBA flag in taskfile for ata_scsi_pass_thru()

2015-10-27 Thread Vinayak Kale
On Tue, Oct 27, 2015 at 1:19 PM, Tejun Heo wrote: > On Tue, Oct 27, 2015 at 01:11:46PM +0530, vinayak.k...@gmail.com wrote: >> From: Vinayak Kale >> >> Enable LBA in taskfile flags for ata_scsi_pass_thru() >> >> Signed-off-by: Vinayak Kale > > A

[PATCH] libata: enable LBA flag in taskfile for ata_scsi_pass_thru()

2015-10-27 Thread vinayak . kale
From: Vinayak Kale Enable LBA in taskfile flags for ata_scsi_pass_thru() Signed-off-by: Vinayak Kale --- drivers/ata/libata-scsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index c2af592..ff75cb6 100644 --- a/drivers/ata

Re: [PATCH v2] libata: add support for NCQ commands for SG interface

2015-10-26 Thread Vinayak Kale
On Tue, Oct 27, 2015 at 11:46 AM, Tejun Heo wrote: > On Tue, Oct 27, 2015 at 11:19:15AM +0530, vinayak.k...@gmail.com wrote: >> From: Vinayak Kale >> >> This patch is needed to make NCQ commands with FPDMA protocol value >> (eg READ/WRITE FPDMA) work over

[PATCH v2] libata: add support for NCQ commands for SG interface

2015-10-26 Thread vinayak . kale
From: Vinayak Kale This patch is needed to make NCQ commands with FPDMA protocol value (eg READ/WRITE FPDMA) work over SCSI Generic (SG) interface. Signed-off-by: Vinayak Kale --- Changes in v2: - Decoupled tf->flags changes in ata_scsi_pass_thru() from this patch as per Tejun's su

Re: [PATCH] libata: add support for NCQ commands for SG interface

2015-10-23 Thread Vinayak Kale
Hi Tejun, On Fri, Oct 23, 2015 at 11:09 AM, Tejun Heo wrote: > Hello, > > On Fri, Oct 23, 2015 at 10:01:35AM +0530, Vinayak Kale wrote: >> > It looks like it'd work given that it's forcing qc->tag into >> > tf->nsect. What's the use case tho? &

Re: [PATCH] libata: add support for NCQ commands for SG interface

2015-10-20 Thread Vinayak Kale
Hi Tejun, On Sat, Oct 17, 2015 at 5:18 PM, wrote: > From: Vinayak Kale > > This patch is needed to make NCQ commands with FPDMA protocol value > (eg READ/WRITE FPDMA) work over SCSI Generic (SG) interface. > > Signed-off-by: Vinayak Kale > --- > drivers/ata/libata-scs

Re: [PATCH] libata: add support for NCQ commands for SG interface

2015-10-18 Thread Vinayak Kale
On Sun, Oct 18, 2015 at 12:12 AM, Sergei Shtylyov wrote: > On 10/17/2015 3:25 PM, Vinayak Kale wrote: > >>>> From: Vinayak Kale >>>> >>>> This patch is needed to make NCQ commands with FPDMA protocol value >>>> (eg READ/WRITE FPDMA) work ove

Re: [PATCH] libata: add support for NCQ commands for SG interface

2015-10-17 Thread Vinayak Kale
On Sat, Oct 17, 2015 at 5:30 PM, Sergei Shtylyov wrote: > Hello. > > On 10/17/2015 2:48 PM, vinayak.k...@gmail.com wrote: > >> From: Vinayak Kale >> >> This patch is needed to make NCQ commands with FPDMA protocol value >> (eg READ/WRITE FPDMA) work over SCSI

[PATCH] libata: add support for NCQ commands for SG interface

2015-10-17 Thread vinayak . kale
From: Vinayak Kale This patch is needed to make NCQ commands with FPDMA protocol value (eg READ/WRITE FPDMA) work over SCSI Generic (SG) interface. Signed-off-by: Vinayak Kale --- drivers/ata/libata-scsi.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-27 Thread Vinayak Menon
On 01/26/2015 10:58 PM, Michal Hocko wrote: On Sat 17-01-15 13:48:34, Christoph Lameter wrote: On Sat, 17 Jan 2015, Vinayak Menon wrote: which had not updated the vmstat_diff. This CPU was in idle for around 30 secs. When I looked at the tvec base for this CPU, the timer associated with

[PATCH] mm: compaction: fix the page state calculation in too_many_isolated

2015-01-21 Thread Vinayak Menon
alculation is performed. This patch fixes that. Signed-off-by: Vinayak Menon --- mm/compaction.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 546e571..2d9730d 100644 --- a/mm/compaction.c +++ b/mm/co

Re: [PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-18 Thread Vinayak Menon
On 01/18/2015 01:18 AM, Christoph Lameter wrote: On Sat, 17 Jan 2015, Vinayak Menon wrote: which had not updated the vmstat_diff. This CPU was in idle for around 30 secs. When I looked at the tvec base for this CPU, the timer associated with vmstat_update had its expiry time less than current

Re: [PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-17 Thread Vinayak Menon
. Cc: Johannes Weiner Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Vinayak Menon Cc: Vladimir Davydov Signed-off-by: Andrew Morton --- mm/vmscan.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff -puN mm/vmscan.c~mm-vmscan-fix-the-page-

Re: [PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-17 Thread Vinayak Menon
On 01/16/2015 09:19 PM, Michal Hocko wrote: On Thu 15-01-15 22:54:20, Vinayak Menon wrote: On 01/14/2015 10:20 PM, Michal Hocko wrote: On Wed 14-01-15 17:06:59, Vinayak Menon wrote: [...] In one such instance, zone_page_state(zone, NR_ISOLATED_FILE) had returned 14, zone_page_state(zone

Re: [PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-15 Thread Vinayak Menon
On 01/16/2015 06:47 AM, Andrew Morton wrote: On Wed, 14 Jan 2015 17:06:59 +0530 Vinayak Menon wrote: It is observed that sometimes multiple tasks get blocked for long in the congestion_wait loop below, in shrink_inactive_list. This is because of vm_stat values not being synced. (__schedule

Re: [PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-15 Thread Vinayak Menon
On 01/14/2015 10:20 PM, Michal Hocko wrote: On Wed 14-01-15 17:06:59, Vinayak Menon wrote: [...] In one such instance, zone_page_state(zone, NR_ISOLATED_FILE) had returned 14, zone_page_state(zone, NR_INACTIVE_FILE) returned 92, and GFP_IOFS was set, and this resulted in too_many_isolated

[PATCH v2] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-14 Thread Vinayak Menon
tasks were spinning in the congestion wait loop for around 4 seconds, in the direct reclaim path. This patch uses zone_page_state_snapshot instead, but restricts its usage to avoid performance penalty. Signed-off-by: Vinayak Menon --- mm/vmscan.c | 56 +---

Re: [PATCH] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-14 Thread Vinayak Menon
On 01/13/2015 09:39 PM, Johannes Weiner wrote: On Tue, Jan 13, 2015 at 04:37:27PM +0530, Vinayak Menon wrote: @@ -1392,6 +1392,44 @@ int isolate_lru_page(struct page *page) return ret; } +static int __too_many_isolated(struct zone *zone, int file, + struct scan_control *sc, int

[PATCH] mm: vmscan: fix the page state calculation in too_many_isolated

2015-01-13 Thread Vinayak Menon
tasks were spinning in the congestion wait loop for around 4 seconds, in the direct reclaim path. This patch uses zone_page_state_snapshot instead, but restricts its usage to avoid performance penalty. Signed-off-by: Vinayak Menon --- mm/vmscan.c | 68

[PATCH] staging: binder: add vm_fault handler

2014-06-02 Thread Vinayak Menon
8/0x3b8) Add a vm_fault handler which returns VM_FAULT_SIGBUS, and prevents the wrong fallback to do_anonymous_page. Signed-off-by: Vinayak Menon --- drivers/staging/android/binder.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/staging/android/binder.c b/

[PATCH RESEND] arm: add DSB after icache flush in __flush_icache_all()

2014-02-11 Thread Vinayak Kale
Add DSB after icache flush to complete the cache maintenance operation. Signed-off-by: Vinayak Kale Acked-by: Catalin Marinas Cc: --- KernelVersion: 3.14-rc1 PS: - This patch is tested for ARM-v7. arch/arm/include/asm/cacheflush.h |1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH RESEND] arm: add DSB after icache flush in __flush_icache_all()

2014-02-11 Thread Vinayak Kale
Add DSB after icache flush to complete the cache maintenance operation. Signed-off-by: Vinayak Kale Acked-by: Catalin Marinas --- PS: - This patch is tested for ARM-v7. arch/arm/include/asm/cacheflush.h |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/cacheflush.h

Re: [PATCH V7 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-12 Thread Vinayak Kale
On Thu, Dec 12, 2013 at 5:16 PM, Will Deacon wrote: > On Thu, Dec 12, 2013 at 06:33:59AM +0000, Vinayak Kale wrote: >> > Below fixup works fine on APM platform. >> > Do you want me to send this fixup as part of next revision of the >> > patch or will you apply it

Re: [PATCH V7 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-11 Thread Vinayak Kale
Hi Will, On Tue, Dec 10, 2013 at 1:00 PM, Vinayak Kale wrote: > Hi Will, > > > On Mon, Dec 9, 2013 at 10:20 PM, Will Deacon wrote: >> Hi Vinayak, >> >> On Wed, Dec 04, 2013 at 10:09:51AM +, Vinayak Kale wrote: >>> Add support for irq registration when

Re: [PATCH V7 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-09 Thread Vinayak Kale
Hi Will, On Mon, Dec 9, 2013 at 10:20 PM, Will Deacon wrote: > Hi Vinayak, > > On Wed, Dec 04, 2013 at 10:09:51AM +, Vinayak Kale wrote: >> Add support for irq registration when pmu interrupt is percpu. > > Getting closer... > >> Signed-off-by: Vinayak Kal

[PATCH V7 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-12-04 Thread Vinayak Kale
ed as 'irq_is_percpu' instead of 'irq_is_per_cpu'. [1]: http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Signed-off-by: Chris Smith Signed-off-by: Vinayak Kale Acked-by: Will Deacon --- include/linux/irqdesc.h |8 1 file changed, 8 insertions

[PATCH V7 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-12-04 Thread Vinayak Kale
of unnecessary pointer typecastings. [1] http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Vinayak Kale (2): genirq: Add an accessor for IRQ_PER_CPU flag arm64: perf: add support for percpu pmu interrupt arch/arm64/kernel/perf_event.c | 108 +--

[PATCH V7 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-04 Thread Vinayak Kale
Add support for irq registration when pmu interrupt is percpu. Signed-off-by: Vinayak Kale Signed-off-by: Tuan Phan --- arch/arm64/kernel/perf_event.c | 108 +--- 1 file changed, 78 insertions(+), 30 deletions(-) diff --git a/arch/arm64/kernel/perf_event.c

Re: [PATCH V6 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-03 Thread Vinayak Kale
On Tue, Dec 3, 2013 at 7:20 PM, Will Deacon wrote: > On Mon, Dec 02, 2013 at 09:34:03AM +0000, Vinayak Kale wrote: >> static void >> +armpmu_disable_percpu_irq(void *data) >> +{ >> + struct arm_pmu *armpmu = data; >> + struct platform_device

Re: [PATCH V6 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-03 Thread Vinayak Kale
On Tue, Dec 3, 2013 at 5:00 PM, Will Deacon wrote: > On Mon, Dec 02, 2013 at 09:34:03AM +0000, Vinayak Kale wrote: >> Add support for irq registration when pmu interrupt is percpu. >> >> Signed-off-by: Vinayak Kale >> Signed-off-by: Tuan Phan >> --- >>

[PATCH V6 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-12-02 Thread Vinayak Kale
by Chris Smith here[1] for similar changes in arm pmu driver. * In arm64 pmu driver: Got rid of unnecessary pointer typecastings. [1] http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Vinayak Kale (2): genirq: Add an accessor for IRQ_PER_CPU flag arm64: perf: add support for percp

[PATCH V6 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-12-02 Thread Vinayak Kale
ed as 'irq_is_percpu' instead of 'irq_is_per_cpu'. [1]: http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Signed-off-by: Chris Smith Signed-off-by: Vinayak Kale --- include/linux/irqdesc.h |8 1 file changed, 8 insertions(+) diff --git a/include/

[PATCH V6 2/2] arm64: perf: add support for percpu pmu interrupt

2013-12-02 Thread Vinayak Kale
Add support for irq registration when pmu interrupt is percpu. Signed-off-by: Vinayak Kale Signed-off-by: Tuan Phan --- arch/arm64/kernel/perf_event.c | 116 +--- 1 file changed, 86 insertions(+), 30 deletions(-) diff --git a/arch/arm64/kernel/perf_event.c

Re: [PATCH V5 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-26 Thread Vinayak Kale
On Tue, Nov 26, 2013 at 12:11 AM, Will Deacon wrote: > On Mon, Nov 25, 2013 at 09:45:53AM +0000, Vinayak Kale wrote: >> Add support for irq registration when pmu interrupt is percpu. >> >> Signed-off-by: Vinayak Kale >> Signed-off-by: Tuan Phan >> --- >>

[PATCH V5 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-11-25 Thread Vinayak Kale
ction name as 'irq_is_percpu' instead of 'irq_is_per_cpu'. [1]: http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Signed-off-by: Chris Smith Signed-off-by: Vinayak Kale --- include/linux/irqdesc.h |8 1 file changed, 8 insertions(+) diff --git a/

[PATCH V5 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-11-25 Thread Vinayak Kale
ion in irqdesc.h . This approach was used by Chris Smith here[1] for similar changes in arm pmu driver. * In arm64 pmu driver: Got rid of unnecessary pointer typecastings. [1] http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Vinayak Kale (2): genirq: Add an accessor for IRQ_P

[PATCH V5 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-25 Thread Vinayak Kale
Add support for irq registration when pmu interrupt is percpu. Signed-off-by: Vinayak Kale Signed-off-by: Tuan Phan --- arch/arm64/kernel/perf_event.c | 108 ++-- 1 file changed, 81 insertions(+), 27 deletions(-) diff --git a/arch/arm64/kernel/perf_event.c

Re: [PATCH V4 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-11-21 Thread Vinayak Kale
On Fri, Nov 22, 2013 at 6:24 AM, Stephen Boyd wrote: > On 11/20/13 22:10, Vinayak Kale wrote: >> [removing chris.sm...@st.com] >> >> On Thu, Nov 21, 2013 at 11:36 AM, Vinayak Kale wrote: >>> On Wed, Nov 20, 2013 at 11:46 PM, Stephen Boyd wrote: >>>

Re: [PATCH V4 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-20 Thread Vinayak Kale
On Wed, Nov 20, 2013 at 11:30 PM, Will Deacon wrote: > On Wed, Nov 20, 2013 at 05:28:50PM +0000, Vinayak Kale wrote: >> In Will's existing code, I think he was taking care of 'no IRQ' case >> by comparing pmu_device->num_resources. Do you think this is not >&g

Re: [PATCH V4 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-20 Thread Vinayak Kale
Hi Marc, On Wed, Nov 20, 2013 at 6:44 PM, Marc Zyngier wrote: > [dropped patc...@apm.com] > > Vinayak, > > Please keep reviewers on CC, as it makes easier to track the changes. Sure, will do. > > On 20/11/13 11:13, Vinayak Kale wrote: >> Add support for irq registr

[PATCH V4 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-20 Thread Vinayak Kale
Add support for irq registration when pmu interrupt is percpu. Signed-off-by: Vinayak Kale Signed-off-by: Tuan Phan --- arch/arm64/kernel/perf_event.c | 108 ++-- 1 file changed, 81 insertions(+), 27 deletions(-) diff --git a/arch/arm64/kernel/perf_event.c

[PATCH V4 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-11-20 Thread Vinayak Kale
t rid of unnecessary pointer typecastings. [1] http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Vinayak Kale (2): genirq: Add an accessor for IRQ_PER_CPU flag arm64: perf: add support for percpu pmu interrupt arch/arm64/kernel/perf_event.c | 108 +

[PATCH V4 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-11-20 Thread Vinayak Kale
This patch adds an accessor function for IRQ_PER_CPU flag. The accessor function is useful to dertermine whether an IRQ is percpu or not. Signed-off-by: Vinayak Kale --- include/linux/irqdesc.h |8 1 file changed, 8 insertions(+) diff --git a/include/linux/irqdesc.h b/include

Re: [PATCH V3 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-18 Thread Vinayak Kale
On Mon, Nov 18, 2013 at 8:10 PM, Marc Zyngier wrote: > On 2013-11-18 14:18, Vinayak Kale wrote: >> >> On Mon, Nov 18, 2013 at 7:16 PM, Marc Zyngier >> wrote: >>> >>> Vinayak, >>> >>> >>> On 2013-11-18 13:22, Vinayak Kale wrote:

Re: [PATCH V3 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-18 Thread Vinayak Kale
On Mon, Nov 18, 2013 at 7:16 PM, Marc Zyngier wrote: > Vinayak, > > > On 2013-11-18 13:22, Vinayak Kale wrote: >> >> Add support for irq registration when pmu interrupt is percpu. >> >> Signed-off-by: Vinayak Kale >> Signed-off-by: Tuan Phan >&g

[PATCH V3 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-11-18 Thread Vinayak Kale
This patch adds an accessor function for IRQ_PER_CPU flag. The accessor function is useful to dertermine whether an IRQ is percpu or not. Signed-off-by: Vinayak Kale --- include/linux/irqdesc.h |8 1 file changed, 8 insertions(+) diff --git a/include/linux/irqdesc.h b/include

[PATCH V3 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-18 Thread Vinayak Kale
Add support for irq registration when pmu interrupt is percpu. Signed-off-by: Vinayak Kale Signed-off-by: Tuan Phan --- arch/arm64/kernel/perf_event.c | 102 +--- 1 file changed, 74 insertions(+), 28 deletions(-) diff --git a/arch/arm64/kernel/perf_event.c

[PATCH V3 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-11-18 Thread Vinayak Kale
/linux/kernel/1207.3/02955.html Vinayak Kale (2): genirq: Add an accessor for IRQ_PER_CPU flag arm64: perf: add support for percpu pmu interrupt arch/arm64/kernel/perf_event.c | 102 +--- include/linux/irqdesc.h|8 2 files changed, 82 inserti

Re: [PATCH V2 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-11-14 Thread Vinayak Kale
Hi Mark, On Wed, Nov 13, 2013 at 7:38 PM, Marc Zyngier wrote: > Hi Vinayak, > > On 13/11/13 11:05, Vinayak Kale wrote: >> This patch adds an accessor function for IRQ_PER_CPU flag. >> The accessor function is useful to dertermine whether an IRQ is percpu or >> not. &

[PATCH V2 1/2] genirq: Add an accessor for IRQ_PER_CPU flag

2013-11-13 Thread Vinayak Kale
This patch adds an accessor function for IRQ_PER_CPU flag. The accessor function is useful to dertermine whether an IRQ is percpu or not. Signed-off-by: Vinayak Kale --- include/linux/irqdesc.h |8 1 file changed, 8 insertions(+) diff --git a/include/linux/irqdesc.h b/include

[PATCH V2 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-11-13 Thread Vinayak Kale
similar changes in arm pmu driver. * In arm64 pmu driver: Got rid of unnecessary pointer typecastings. [1] http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/02955.html Vinayak Kale (2): genirq: Add an accessor for IRQ_PER_CPU flag arm64: perf: add support for percpu pmu interrupt arch

[PATCH V2 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-13 Thread Vinayak Kale
Add support for irq registration when pmu interrupt is percpu. Signed-off-by: Vinayak Kale Signed-off-by: Tuan Phan --- arch/arm64/kernel/perf_event.c | 102 +--- 1 file changed, 74 insertions(+), 28 deletions(-) diff --git a/arch/arm64/kernel/perf_event.c

Re: [PATCH 0/2] genirq: arm64: perf: support for percpu pmu interrupt

2013-11-11 Thread Vinayak Kale
On Mon, Nov 11, 2013 at 4:14 PM, Will Deacon wrote: > On Sat, Nov 09, 2013 at 01:04:23AM +, Stephen Boyd wrote: >> On 11/06/13 04:07, Vinayak Kale wrote: >> > This patch series adds support to handle interrupt >> > registration/deregistration >> > in arm6

Re: [PATCH 2/2] arm64: perf: add support for percpu pmu interrupt

2013-11-11 Thread Vinayak Kale
On Fri, Nov 8, 2013 at 9:27 PM, Will Deacon wrote: > On Wed, Nov 06, 2013 at 12:07:37PM +0000, Vinayak Kale wrote: >> Add support for irq registration when pmu interrupt is percpu. >> >> Signed-off-by: Vinayak Kale >> Signed-off-by: Tuan Phan >> --- >>

  1   2   >