[PATCH] cgroup: avoid creating degenerate allcg_list

2012-11-28 Thread Greg Thelen
tialization before insertion. Signed-off-by: Greg Thelen --- kernel/cgroup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 01d5342..ece60d4 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1394,6 +1394,7 @@ static void init_

[PATCH] cgroup: fix lockdep warning for event_control

2012-11-28 Thread Greg Thelen
remove from the wait queue. Signed-off-by: Greg Thelen Signed-off-by: Aaron Durbin --- kernel/cgroup.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ece60d4..c79a969 100644 --- a/kernel/cgroup.c +++ b/kernel/cg

Re: [PATCH] cgroup: fix lockdep warning for event_control

2012-11-28 Thread Greg Thelen
On Wed, Nov 28 2012, Tejun Heo wrote: > Hello, Greg. > > On Wed, Nov 28, 2012 at 12:15:42PM -0800, Greg Thelen wrote: >> @@ -4276,6 +4276,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) >> DEFINE_WAIT(wait); >> struct cgroup_event *event, *tmp; &

[PATCH 2/2] cgroup: list_del_init() on removed events

2012-11-28 Thread Greg Thelen
Use list_del_init() rather than list_del() to remove events from cgrp->event_list. No functional change. This is just defensive coding. Signed-off-by: Greg Thelen --- kernel/cgroup.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgrou

[PATCH 1/2] cgroup: fix lockdep warning for event_control

2012-11-28 Thread Greg Thelen
remove from the wait queue. Signed-off-by: Greg Thelen Signed-off-by: Aaron Durbin --- kernel/cgroup.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ece60d4..a0d75bb 100644 --- a/kernel/cgroup.c +++ b/kernel/cg

Re: [PATCH for 3.2.34] memcg: do not trigger OOM from add_to_page_cache_locked

2013-02-05 Thread Greg Thelen
On Tue, Feb 05 2013, Michal Hocko wrote: > On Tue 05-02-13 15:49:47, azurIt wrote: > [...] >> Just to be sure - am i supposed to apply this two patches? >> http://watchdog.sk/lkml/patches/ > > 5-memcg-fix-1.patch is not complete. It doesn't contain the folloup I > mentioned in a follow up email. H

Re: [PATCH for 3.2.34] memcg: do not trigger OOM from add_to_page_cache_locked

2013-02-05 Thread Greg Thelen
On Tue, Feb 05 2013, Michal Hocko wrote: > On Tue 05-02-13 08:48:23, Greg Thelen wrote: >> On Tue, Feb 05 2013, Michal Hocko wrote: >> >> > On Tue 05-02-13 15:49:47, azurIt wrote: >> > [...] >> >> Just to be sure - am i supposed to apply this two p

Re: [PATCH for 3.2.34] memcg: do not trigger OOM from add_to_page_cache_locked

2013-02-07 Thread Greg Thelen
On Tue, Feb 05 2013, Michal Hocko wrote: > On Tue 05-02-13 10:09:57, Greg Thelen wrote: >> On Tue, Feb 05 2013, Michal Hocko wrote: >> >> > On Tue 05-02-13 08:48:23, Greg Thelen wrote: >> >> On Tue, Feb 05 2013, Michal Hocko wrote: >> >>

Re: [PATCH] memcg: implement low limits

2013-02-27 Thread Greg Thelen
On Wed, Feb 27 2013, Roman Gushchin wrote: > Hi, all! > > I've implemented low limits for memory cgroups. The primary goal was to add > an ability > to protect some memory from reclaiming without using mlock(). A kind of "soft > mlock()". > > I think this patch will be helpful when it's necessa

[PATCH 1/2] tmpfs: fix use-after-free of mempolicy object

2013-02-19 Thread Greg Thelen
3.3. I did not look back further. Signed-off-by: Greg Thelen --- mm/shmem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 5dd56f6..efd0b3a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2487,6 +2487,7 @@ static int shmem_remount_fs(s

[PATCH 2/2] tmpfs: fix mempolicy object leaks

2013-02-19 Thread Greg Thelen
mount -t tmpfs -o mpol=interleave,mpol=interleave,size=100M nodev /mnt umount /mnt done This patch fixes all of the above. I could have broken the patch into three pieces but is seemed easier to review as one. Signed-off-by: Greg Thelen --- mm/shmem.c | 12 +--- 1 file ch

Re: [PATCH v6 00/29] kmem controller for memcg.

2012-11-02 Thread Greg Thelen
Dave Miller and Tom Herbert could suggest >> testing approaches. >> > > I can test it, but unfortunately I am unlikely to get to prepare a good > environment before Barcelona. > > I know, however, that Greg Thelen was testing netperf in his setup. > Greg, do you have any

Re: [PATCH V2 4/6] memcg: add per cgroup dirty pages accounting

2012-07-30 Thread Greg Thelen
On Fri, Jul 27 2012, Sha Zhengju wrote: > From: Sha Zhengju > > This patch adds memcg routines to count dirty pages, which allows memory > controller > to maintain an accurate view of the amount of its dirty memory and can > provide some > info for users while group's direct reclaim is working.

Re: [PATCH V2 5/6] memcg: add per cgroup writeback pages accounting

2012-07-30 Thread Greg Thelen
On Fri, Jul 27 2012, Sha Zhengju wrote: > From: Sha Zhengju > > Similar to dirty page, we add per cgroup writeback pages accounting. The lock > rule still is: > mem_cgroup_begin_update_page_stat() > modify page WRITEBACK stat > mem_cgroup_update_page_stat() > mem_c

[PATCH 1/2 v4] memcg: refactor mem_control_numa_stat_show()

2013-09-16 Thread Greg Thelen
11,736,855 b31717 vmlinux.after Signed-off-by: Greg Thelen Signed-off-by: Ying Han --- Changelog since v3: - Use ARRAY_SIZE(stats) rather than array terminator. - rebased to latest linus/master (d8efd82) to incorporate 182446d08 "cgroup: pass around cgroup_subsys_state instead of cgroup in file me

[PATCH 2/2 v4] memcg: support hierarchical memory.numa_stats

2013-09-16 Thread Greg Thelen
0 N1=0 N2=0 N3=0 hierarchical_total=908 N0=552 N1=317 N2=39 N3=0 hierarchical_file=850 N0=549 N1=301 N2=0 N3=0 hierarchical_anon=58 N0=3 N1=16 N2=39 N3=0 hierarchical_unevictable=0 N0=0 N1=0 N2=0 N3=0 Signed-off-by: Ying Han Signed-off-by: Greg Thelen --- Changelog since v3: - push 'iter

[PATCH 1/2 v3] memcg: refactor mem_control_numa_stat_show()

2013-09-04 Thread Greg Thelen
11,627,372 b16b6c vmlinux.after Signed-off-by: Greg Thelen Signed-off-by: Ying Han --- Changelog since v2: - rebased to v3.11 - updated commit description mm/memcontrol.c | 57 +++-- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/mm

[PATCH 2/2 v3] memcg: support hierarchical memory.numa_stats

2013-09-04 Thread Greg Thelen
N1=0 N2=0 N3=0 hierarchical_total=73 N0=0 N1=41 N2=32 N3=0 hierarchical_file=14 N0=0 N1=0 N2=14 N3=0 hierarchical_anon=59 N0=0 N1=41 N2=18 N3=0 hierarchical_unevictable=0 N0=0 N1=0 N2=0 N3=0 Signed-off-by: Ying Han Signed-off-by: Greg Thelen --- Changelog since v2: - reworded Documentation/cgroup/memo

[PATCH] memcg: fix multiple large threshold notifications

2013-08-31 Thread Greg Thelen
ntroduction of memcg threshold notifications in v2.6.34-rc1-116-g2e72b6347c94 "memcg: implement memory thresholds" Signed-off-by: Greg Thelen --- mm/memcontrol.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 08

[PATCH] res_counter: delete res_counter_write()

2012-11-14 Thread Greg Thelen
Since 628f423553 "memcg: limit change shrink usage" both res_counter_write() and write_strategy_fn have been unused. This patch deletes them both. Signed-off-by: Greg Thelen --- include/linux/res_counter.h |5 - kernel/res_counter.c| 22 -- 2 fil

Re: [RFC v3 0/3] vmpressure_fd: Linux VM pressure notifications

2012-11-07 Thread Greg Thelen
On Wed, Nov 07 2012, Kirill A. Shutemov wrote: > On Wed, Nov 07, 2012 at 02:53:49AM -0800, Anton Vorontsov wrote: >> Hi all, >> >> This is the third RFC. As suggested by Minchan Kim, the API is much >> simplified now (comparing to vmevent_fd): >> >> - As well as Minchan, KOSAKI Motohiro didn't l

[PATCH 1/2] cgroups: move cgroup_event_listener.c to tools/cgroup

2013-01-04 Thread Greg Thelen
Move the cgroup_event_listener.c tool from Documentation into the new tools/cgroup directory. This change involves wiring cgroup_event_listener.c into the tools/ make system so that is can be built with: $ make tools/cgroup Signed-off-by: Greg Thelen --- Documentation/cgroups/00-INDEX

[PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-04 Thread Greg Thelen
: $ gcc -Wall -O2 cgroup_event_listener.c cgroup_event_listener.c: In function ‘main’: cgroup_event_listener.c:109:2: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Greg Thelen --- tools/cgroup/cgroup_event_listener.c |2 +- 1 files changed, 1

kmem accounting netperf data

2012-11-16 Thread Greg Thelen
We ran some netperf comparisons measuring the overhead of enabling CONFIG_MEMCG_KMEM with a kmem limit. Short answer: no regression seen. This is a multiple machine (client,server) netperf test. Both client and server machines were running the same kernel with the same configuration. A baseline

[PATCH] vfs: dcache: cond_resched in shrink_dentry_list

2013-03-25 Thread Greg Thelen
1.tv_sec * 100 + t1.tv_usec)); printf("done: %g elapsed\n", diff/1e6); return 0; } Signed-off-by: Greg Thelen --- fs/dcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/dcache.c b/fs/dcache.c index fbfae008

Re: [PATCH] vfs: dcache: cond_resched in shrink_dentry_list

2013-03-25 Thread Greg Thelen
On Mon, Mar 25 2013, Dave Chinner wrote: > On Mon, Mar 25, 2013 at 10:22:31AM -0700, Greg Thelen wrote: >> Call cond_resched() from shrink_dentry_list() to preserve >> shrink_dcache_parent() interactivity. >> >> void shrink_dcache_parent(struct dentry * parent)

Re: [PATCH] vfs: dcache: cond_resched in shrink_dentry_list

2013-03-25 Thread Greg Thelen
On Mon, Mar 25 2013, Dave Chinner wrote: > On Mon, Mar 25, 2013 at 05:39:13PM -0700, Greg Thelen wrote: >> On Mon, Mar 25 2013, Dave Chinner wrote: >> > On Mon, Mar 25, 2013 at 10:22:31AM -0700, Greg Thelen wrote: >> >> Call cond_resched() from sh

Re: [PATCH] vfs: dcache: cond_resched in shrink_dentry_list

2013-04-09 Thread Greg Thelen
On Mon, Mar 25 2013, Greg Thelen wrote: > On Mon, Mar 25 2013, Dave Chinner wrote: > >> On Mon, Mar 25, 2013 at 05:39:13PM -0700, Greg Thelen wrote: >>> On Mon, Mar 25 2013, Dave Chinner wrote: >>> > On Mon, Mar 25, 2013 at 10:22:31AM -0700, Greg Thelen wrote

Re: [PATCHv10 1/4] debugfs: add get/set for atomic types

2013-05-09 Thread Greg Thelen
On Wed, May 08 2013, Seth Jennings wrote: > debugfs currently lack the ability to create attributes > that set/get atomic_t values. > > This patch adds support for this through a new > debugfs_create_atomic_t() function. > > Signed-off-by: Seth Jennings > Acked-by: Greg Kroah-Hartman > Acked-by:

Re: [PATCH] vfs: dcache: cond_resched in shrink_dentry_list

2013-04-10 Thread Greg Thelen
On Wed, Apr 10 2013, Andrew Morton wrote: > On Tue, 09 Apr 2013 17:37:20 -0700 Greg Thelen wrote: > >> > Call cond_resched() in shrink_dcache_parent() to maintain >> > interactivity. >> > >> > Before this patch: >> > >> > void shrin

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-21 Thread Greg Thelen
On Thu, Aug 09 2012, Glauber Costa wrote: > This patch introduces infrastructure for tracking kernel memory pages to > a given memcg. This will happen whenever the caller includes the flag > __GFP_KMEMCG flag, and the task belong to a memcg other than the root. > > In memcontrol.h those functions

Re: [PATCH v2 09/11] memcg: propagate kmem limiting information to children

2012-08-21 Thread Greg Thelen
On Tue, Aug 21 2012, Michal Hocko wrote: > On Tue 21-08-12 13:22:09, Glauber Costa wrote: >> On 08/21/2012 11:54 AM, Michal Hocko wrote: > [...] >> > But maybe you have a good use case for that? >> > >> Honestly, I don't. For my particular use case, this would be always on, >> and end of story. I

Re: [PATCH v2 09/11] memcg: propagate kmem limiting information to children

2012-08-22 Thread Greg Thelen
On Wed, Aug 22 2012, Glauber Costa wrote: I am fine with either, I just need a clear sign from you guys so I don't keep deimplementing and reimplementing this forever. >>> >>> I would be for make it simple now and go with additional features later >>> when there is a demand for them

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-22 Thread Greg Thelen
On Wed, Aug 22 2012, Glauber Costa wrote: > On 08/22/2012 01:50 AM, Greg Thelen wrote: >> On Thu, Aug 09 2012, Glauber Costa wrote: >> >>> This patch introduces infrastructure for tracking kernel memory pages to >>> a given memcg. This will happen when

Re: [PATCH v2 09/11] memcg: propagate kmem limiting information to children

2012-08-23 Thread Greg Thelen
On Thu, Aug 23 2012, Glauber Costa wrote: > On 08/23/2012 03:23 AM, Greg Thelen wrote: >> On Wed, Aug 22 2012, Glauber Costa wrote: >> >>>>>> >>>>>> I am fine with either, I just need a clear sign from you guys so I don't >>>>&

Re: [PATCH v2 07/11] mm: Allocate kernel pages to the right memcg

2012-08-09 Thread Greg Thelen
On Thu, Aug 09 2012, Glauber Costa wrote: > When a process tries to allocate a page with the __GFP_KMEMCG flag, the > page allocator will call the corresponding memcg functions to validate > the allocation. Tasks in the root memcg can always proceed. > > To avoid adding markers to the page - and a

Re: [PATCH v2 07/11] mm: Allocate kernel pages to the right memcg

2012-08-10 Thread Greg Thelen
On Thu, Aug 09 2012, Glauber Costa wrote: > When a process tries to allocate a page with the __GFP_KMEMCG flag, the > page allocator will call the corresponding memcg functions to validate > the allocation. Tasks in the root memcg can always proceed. > > To avoid adding markers to the page - and a

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-10 Thread Greg Thelen
On Thu, Aug 09 2012, Glauber Costa wrote: > This patch introduces infrastructure for tracking kernel memory pages to > a given memcg. This will happen whenever the caller includes the flag > __GFP_KMEMCG flag, and the task belong to a memcg other than the root. > > In memcontrol.h those functions

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-13 Thread Greg Thelen
On Mon, Aug 13 2012, Glauber Costa wrote: >> >> Here's the dmesg splat. >> > > Do you always get this report in the same way? > I managed to get a softirq inconsistency like yours, but the complaint > goes for a different lock. Yes, I repeatedly get the same dmesg splat below. Once I your 'exe

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-14 Thread Greg Thelen
On Mon, Aug 13 2012, Glauber Costa wrote: >>> > + WARN_ON(mem_cgroup_is_root(memcg)); >>> > + size = (1 << order) << PAGE_SHIFT; >>> > + memcg_uncharge_kmem(memcg, size); >>> > + mem_cgroup_put(memcg); >> Why do we need ref-counting here ? kmem res_counter cannot work as >> reference ? > This is o

Re: [PATCH v2 04/11] kmem accounting basic infrastructure

2012-08-15 Thread Greg Thelen
On Wed, Aug 15 2012, Christoph Lameter wrote: > On Wed, 15 Aug 2012, Michal Hocko wrote: > >> > That is not what the kernel does, in general. We assume that if he wants >> > that memory and we can serve it, we should. Also, not all kernel memory >> > is unreclaimable. We can shrink the slabs, for

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-15 Thread Greg Thelen
On Wed, Aug 15 2012, Glauber Costa wrote: > On 08/14/2012 10:58 PM, Greg Thelen wrote: >> On Mon, Aug 13 2012, Glauber Costa wrote: >> >>>>>> +WARN_ON(mem_cgroup_is_root(memcg)); >>>>>> +size = (1 << order) <&

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-15 Thread Greg Thelen
On Wed, Aug 15 2012, Glauber Costa wrote: > On 08/15/2012 08:38 PM, Greg Thelen wrote: >> On Wed, Aug 15 2012, Glauber Costa wrote: >> >>> On 08/14/2012 10:58 PM, Greg Thelen wrote: >>>> On Mon, Aug 13 2012, Glauber Costa wrote: >>>>

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-15 Thread Greg Thelen
On Wed, Aug 15 2012, Glauber Costa wrote: > On 08/15/2012 09:12 PM, Greg Thelen wrote: >> On Wed, Aug 15 2012, Glauber Costa wrote: >> >>> On 08/15/2012 08:38 PM, Greg Thelen wrote: >>>> On Wed, Aug 15 2012, Glauber Costa wrote: >>>> >>>&g

Re: [PATCH 2/7] memcg: remove MEMCG_NR_FILE_MAPPED

2012-07-09 Thread Greg Thelen
pt in sync. So it might help to add a comment to both indicating their relationship so we don't accidentally modify the enum without updating the dependent string table. Otherwise, looks good. Reviewed-by: Greg Thelen -- To unsubscribe from this list: send the line "unsubscribe linux-ke

Re: [PATCH 5/7] memcg: add per cgroup dirty pages accounting

2012-07-09 Thread Greg Thelen
On Thu, Jun 28 2012, Sha Zhengju wrote: > From: Sha Zhengju > > This patch adds memcg routines to count dirty pages, which allows memory > controller > to maintain an accurate view of the amount of its dirty memory and can > provide some > info for users while group's direct reclaim is working.

Re: [PATCH 6/7] memcg: add per cgroup writeback pages accounting

2012-07-09 Thread Greg Thelen
On Thu, Jun 28 2012, Sha Zhengju wrote: > From: Sha Zhengju > > Similar to dirty page, we add per cgroup writeback pages accounting. The lock > rule still is: > mem_cgroup_begin_update_page_stat() > modify page WRITEBACK stat > mem_cgroup_update_page_stat() > mem_cgroup_en

Re: [PATCH] memcg: Add memory.pressure_level events

2013-02-12 Thread Greg Thelen
On Sun, Feb 10 2013, Anton Vorontsov wrote: > With this patch userland applications that want to maintain the > interactivity/memory allocation cost can use the new pressure level > notifications. The levels are defined like this: > > The "low" level means that the system is reclaiming memory for

Re: [PATCH] memcg: Add memory.pressure_level events

2013-02-13 Thread Greg Thelen
On Tue, Feb 12 2013, Anton Vorontsov wrote: > Hi Greg, > > Thanks for taking a look! > > On Tue, Feb 12, 2013 at 10:42:51PM -0800, Greg Thelen wrote: > [...] >> > +static bool vmpressure_event(struct vmpressure *vmpr, >> > +

Re: [PATCH V3 5/8] memcg: add per cgroup writeback pages accounting

2013-01-06 Thread Greg Thelen
On Tue, Dec 25 2012, Sha Zhengju wrote: > From: Sha Zhengju > > Similar to dirty page, we add per cgroup writeback pages accounting. The lock > rule still is: > mem_cgroup_begin_update_page_stat() > modify page WRITEBACK stat > mem_cgroup_update_page_stat() > mem_c

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-06 Thread Greg Thelen
e more explicit: > incrementing (2): > __set_page_dirty > __set_page_dirty_nobuffers > decrementing (2): > clear_page_dirty_for_io > cancel_dirty_page > > To prevent AB/BA deadlock mentioned by Greg Thelen in pr

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Greg Thelen
On Mon, Jan 07 2013, Tejun Heo wrote: > On Fri, Jan 04, 2013 at 01:05:18PM -0800, Greg Thelen wrote: >> If the command line parameter cannot >> be opened, then cgroup_event_listener prints an error message and >> tries to return an error. However, due to an uninitialized v

Re: [PATCH] fs, mm: account filp and names caches to kmemcg

2017-10-24 Thread Greg Thelen
Michal Hocko wrote: > On Tue 24-10-17 14:58:54, Johannes Weiner wrote: >> On Tue, Oct 24, 2017 at 07:55:58PM +0200, Michal Hocko wrote: >> > On Tue 24-10-17 13:23:30, Johannes Weiner wrote: >> > > On Tue, Oct 24, 2017 at 06:22:13PM +0200, Michal Hocko wrote: >> > [...] >> > > > What would prevent

Re: [PATCH] fs, mm: account filp and names caches to kmemcg

2017-10-25 Thread Greg Thelen
Johannes Weiner wrote: > On Wed, Oct 25, 2017 at 09:00:57PM +0200, Michal Hocko wrote: >> On Wed 25-10-17 14:11:06, Johannes Weiner wrote: >> > "Safe" is a vague term, and it doesn't make much sense to me in this >> > situation. The OOM behavior should be predictable and consistent. >> > >> > Ye

Re: [PATCH] fs, mm: account filp and names caches to kmemcg

2017-10-26 Thread Greg Thelen
Michal Hocko wrote: > Greg Thelen wrote: > > So a force charge fallback might be a needed even with oom killer successful > > invocations. Or we'll need to teach out_of_memory() to return three values > > (e.g. NO_VICTIM, NEW_VICTIM, PENDING_VICTIM) and try_charge()

Re: [PATCH v2] mm: condense scan_control

2018-06-20 Thread Greg Thelen
On Tue, May 29, 2018 at 11:12 PM Greg Thelen wrote: > > Use smaller scan_control fields for order, priority, and reclaim_idx. > Convert fields from int => s8. All easily fit within a byte: > * allocation order range: 0..MAX_ORDER(64?) > * priority range:

[PATCH] writeback: safer lock nesting

2018-04-06 Thread Greg Thelen
y possible, it's debatable if there's any reason to modify the kernel. I suggest we should to prevent future surprises. Reported-by: Wang Long Signed-off-by: Greg Thelen --- fs/fs-writeback.c | 5 +++-- include/linux/backing-dev.h | 18 -- mm/page-writeback.

Re: [PATCH] writeback: safer lock nesting

2018-04-06 Thread Greg Thelen
On Fri, Apr 6, 2018 at 1:07 AM Michal Hocko wrote: > On Fri 06-04-18 01:03:24, Greg Thelen wrote: > [...] > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > > index d4d04fee568a..d51bae5a53e2 100644 > > --- a/fs/fs-writeback.c > > +++ b/fs/fs-writeback.c

[PATCH v2] writeback: safer lock nesting

2018-04-06 Thread Greg Thelen
y possible, it's debatable if there's any reason to modify the kernel. I suggest we should to prevent future surprises. Reported-by: Wang Long Signed-off-by: Greg Thelen --- Changelog since v1: - add wb_lock_cookie to record lock context. fs/fs-writeback.c| 7 --- i

[PATCH for-4.4] writeback: safer lock nesting

2018-04-11 Thread Greg Thelen
ble. Newer stable kernels should use be able to cherry pick the upstream "writeback: safer lock nesting" patch. ] Fixes: 682aa8e1a6a1 ("writeback: implement unlocked_inode_to_wb transaction and use it for stat updates") Cc: sta...@vger.kernel.org # v4.2+ Reported-by: Wang Lon

[PATCH v4] writeback: safer lock nesting

2018-04-11 Thread Greg Thelen
cts applying this patch. For a clean 4.4 patch see "[PATCH for-4.4] writeback: safer lock nesting" https://lkml.org/lkml/2018/4/11/146 Fixes: 682aa8e1a6a1 ("writeback: implement unlocked_inode_to_wb transaction and use it for stat updates") Cc: sta...@vger.kernel.org # v4.2+ Reported-

Re: [PATCH for-4.4] writeback: safer lock nesting

2018-04-11 Thread Greg Thelen
On Wed, Apr 11, 2018 at 1:45 AM Greg Thelen wrote: > lock_page_memcg()/unlock_page_memcg() use spin_lock_irqsave/restore() if > the page's memcg is undergoing move accounting, which occurs when a > process leaves its memcg for a new one that has > memory.move_charge

[PATCH] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-13 Thread Greg Thelen
Allow INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/infiniband/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index ee270e065ba9..f20a3977087c 100644 --- a

[PATCH v3] writeback: safer lock nesting

2018-04-09 Thread Greg Thelen
y possible, it's debatable if there's any reason to modify the kernel. I suggest we should to prevent future surprises. Reported-by: Wang Long Signed-off-by: Greg Thelen Change-Id: Ibb773e8045852978f6207074491d262f1b3fb613 --- Changelog since v2: - explicitly initialize wb_lock_cooki

Re: [PATCH v3] writeback: safer lock nesting

2018-04-10 Thread Greg Thelen
On Tue, Apr 10, 2018 at 1:15 AM Wang Long wrote: > > lock_page_memcg()/unlock_page_memcg() use spin_lock_irqsave/restore() if > > the page's memcg is undergoing move accounting, which occurs when a > > process leaves its memcg for a new one that has > > memory.move_charge_at_immigrate set. > > >

Re: [PATCH v3] writeback: safer lock nesting

2018-04-10 Thread Greg Thelen
On Tue, Apr 10, 2018 at 1:38 PM Andrew Morton wrote: > On Mon, 9 Apr 2018 17:59:08 -0700 Greg Thelen wrote: > > lock_page_memcg()/unlock_page_memcg() use spin_lock_irqsave/restore() if > > the page's memcg is undergoing move accounting, which occurs when a > > proc

Re: [PATCH] writeback: safer lock nesting

2018-04-10 Thread Greg Thelen
On Tue, Apr 10, 2018 at 7:44 PM Wang Long wrote: > > Hi, > > > > [This is an automated email] > > > > This commit has been processed by the -stable helper bot and determined > > to be a high probability candidate for -stable trees. (score: 44.5575) > > > > The bot has tested the following trees:

Re: [PATCH] memcg, oom: move out_of_memory back to the charge path

2018-06-29 Thread Greg Thelen
Michal Hocko wrote: > On Thu 28-06-18 16:19:07, Greg Thelen wrote: >> Michal Hocko wrote: > [...] >> > + if (mem_cgroup_out_of_memory(memcg, mask, order)) >> > + return OOM_SUCCESS; >> > + >> > + WARN(1,"Memory

Re: [PATCH] memcg, oom: move out_of_memory back to the charge path

2018-07-03 Thread Greg Thelen
Michal Hocko wrote: > On Fri 29-06-18 11:59:04, Greg Thelen wrote: >> Michal Hocko wrote: >> >> > On Thu 28-06-18 16:19:07, Greg Thelen wrote: >> >> Michal Hocko wrote: >> > [...] >> >> > + if (mem_cgroup_out_of_memory(mem

[PATCH] writeback: update stale account_page_redirty() comment

2018-06-25 Thread Greg Thelen
commit 93f78d882865 ("writeback: move backing_dev_info->bdi_stat[] into bdi_writeback") replaced BDI_DIRTIED with WB_DIRTIED in account_page_redirty(). Update comment to track that change. BDI_DIRTIED => WB_DIRTIED BDI_WRITTEN => WB_WRITTEN Signed-off-by: Greg T

Re: [PATCH] memcg, oom: move out_of_memory back to the charge path

2018-06-28 Thread Greg Thelen
f the flag now > - s@mem_cgroup_oom_enable@mem_cgroup_enter_user_fault@g > s@mem_cgroup_oom_disable@mem_cgroup_exit_user_fault@g as per Johannes > - make oom_kill_disable an exceptional case because it should be rare > and the normal oom handling a core of the function - per Johannes > &

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-25 Thread Greg Thelen
d reference to `ib_dealloc_pd' > Fixes: 9533b292a7ac ("IB: remove redundant INFINIBAND kconfig dependencies") > Signed-off-by: Arnd Bergmann Acked-by: Greg Thelen Sorry for the 9533b292a7ac problem. At this point the in release cycle, I think Arnd's revert is best.

[PATCH v2] mm: condense scan_control

2018-05-29 Thread Greg Thelen
that s8 is capable of storing max values. This reduces sizeof(struct scan_control): * 96 => 80 bytes (x86_64) * 68 => 56 bytes (i386) scan_control structure field order is changed to utilize padding. After this patch there is 1 bit of scan_control padding. Signed-off-by: Greg Thelen Suggested-

Re: [PATCH] mm: convert scan_control.priority int => byte

2018-05-29 Thread Greg Thelen
Matthew Wilcox wrote: > On Mon, May 28, 2018 at 07:40:25PM -0700, Greg Thelen wrote: >> Reclaim priorities range from 0..12(DEF_PRIORITY). >> scan_control.priority is a 4 byte int, which is overkill. >> >> Since commit 6538b8ea886e ("x86_64: expand kerne

Re: [PATCH] iw_cxgb4: add INFINIBAND_ADDR_TRANS dependency

2018-05-30 Thread Greg Thelen
NS disable building rdma_cm.ko? That > > >>> is not correct. > > >> That seems like a reasonable thing to do.. > > > rdma_ucm.ko is for usermode users, rdma_cm.ko is for kernel users, and > > > is required for iwarp drivers. It seems rdma_cm.ko is not being > > > compiled if ADDR_TRANS is not set. > I think the intention was to completely disable rdma-cm, including all > support for rx'ing remote packets? Greg? Yes. That's my goal when INFINIBAND_ADDR_TRANS is unset. > If this is required for iwarp then Arnd's patch is probably the right > way to go.. > Jason Agreed. Acked-by: Greg Thelen

Re: [PATCH] memcg, oom: move out_of_memory back to the charge path

2018-07-03 Thread Greg Thelen
Michal Hocko wrote: > On Tue 03-07-18 00:08:05, Greg Thelen wrote: >> Michal Hocko wrote: >> >> > On Fri 29-06-18 11:59:04, Greg Thelen wrote: >> >> Michal Hocko wrote: >> >> >> >> > On Thu 28-06-18 16:19:07, Greg Thelen wrote:

Re: [RFC PATCH 0/3] mm: memcontrol: delayed force empty

2019-01-04 Thread Greg Thelen
Yang Shi wrote: > On 1/3/19 11:23 AM, Michal Hocko wrote: >> On Thu 03-01-19 11:10:00, Yang Shi wrote: >>> >>> On 1/3/19 10:53 AM, Michal Hocko wrote: On Thu 03-01-19 10:40:54, Yang Shi wrote: > On 1/3/19 10:13 AM, Michal Hocko wrote: >> [...] >> Is there any reason for your scripts

Re: [patch 2/2] mm: memcontrol: default hierarchy interface for memory

2015-01-13 Thread Greg Thelen
On Thu, Jan 08 2015, Johannes Weiner wrote: > Introduce the basic control files to account, partition, and limit > memory using cgroups in default hierarchy mode. > > This interface versioning allows us to address fundamental design > issues in the existing memory cgroup interface, further explai

[PATCH] memcg: add BUILD_BUG_ON() for string tables

2015-01-12 Thread Greg Thelen
Use BUILD_BUG_ON() to compile assert that memcg string tables are in sync with corresponding enums. There aren't currently any issues with these tables. This is just defensive. Signed-off-by: Greg Thelen --- mm/memcontrol.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH] memcg: remove extra newlines from memcg oom kill log

2015-01-12 Thread Greg Thelen
cnt 240649 Fixes: e61734c55c24 ("cgroup: remove cgroup->name") Signed-off-by: Greg Thelen --- mm/memcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 851924fa5170..683b4782019b 100644 --- a/mm/memcontrol.c +++

Re: [RFC] Is it correctly that the usage for spin_{lock|unlock}_irq in clear_page_dirty_for_io

2018-04-03 Thread Greg Thelen
On Tue, Apr 3, 2018 at 5:03 AM Michal Hocko wrote: > On Mon 02-04-18 19:50:50, Wang Long wrote: > > > > Hi, Johannes Weiner and Tejun Heo > > > > I use linux-4.4.y to test the new cgroup controller io and the current > > stable kernel linux-4.4.y has the follow logic > > > > > > int clear_page_d

[PATCH 0/6] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-26 Thread Greg Thelen
BAND_ADDR_TRANS" net/9p/trans_rdma.c - depends on NET_9P_RDMA => INFINIBAND_ADDR_TRANS net/rds/ib.c net/rds/ib_cm.c net/rds/rdma_transport.c - depends on RDS_RDMA => INFINIBAND_ADDR_TRANS net/sunrpc/xprtrdma/svc_rdma_transport.c net/sunrpc/xprtrdma/transport.c net/sunrpc/xprtrdma/ve

[PATCH 2/6] nvmet-rdma: depend on INFINIBAND_ADDR_TRANS

2018-04-26 Thread Greg Thelen
NVME_TARGET_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/nvme/target/Kconfig | 2 +- 1 file changed, 1

[PATCH 3/6] ib_srpt: depend on INFINIBAND_ADDR_TRANS

2018-04-26 Thread Greg Thelen
INFINIBAND_SRPT code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/infiniband/ulp/srpt/Kconfig | 2 +- 1 file

[PATCH 1/6] nvme: depend on INFINIBAND_ADDR_TRANS

2018-04-26 Thread Greg Thelen
NVME_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/nvme/host/Kconfig | 2 +- 1 file changed, 1

[PATCH 4/6] cifs: smbd: depend on INFINIBAND_ADDR_TRANS

2018-04-26 Thread Greg Thelen
CIFS_SMB_DIRECT code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir Reviewed-by: Long Li --- fs/cifs/Kconfig | 2 +- 1 file

[PATCH 5/6] ib_srp: depend on INFINIBAND_ADDR_TRANS

2018-04-26 Thread Greg Thelen
INFINIBAND_SRP code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/infiniband/ulp/srp/Kconfig | 2 +- 1 file

[PATCH 6/6] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-26 Thread Greg Thelen
Allow INFINIBAND without INFINIBAND_ADDR_TRANS because fuzzing has been finding fair number of CM bugs. So provide option to disable it. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/infiniband/Kconfig | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH 3/5] ib_srpt: depend on INFINIBAND_ADDR_TRANS

2018-04-30 Thread Greg Thelen
On Mon, Apr 30, 2018 at 4:35 PM Jason Gunthorpe wrote: > On Wed, Apr 25, 2018 at 03:33:39PM -0700, Greg Thelen wrote: > > INFINIBAND_SRPT code depends on INFINIBAND_ADDR_TRANS provided symbols. > > So declare the kconfig dependency. This is necessary to allow for > > enabli

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-28 Thread Greg Thelen
Jason Gunthorpe wrote: On Fri, May 25, 2018 at 05:32:52PM -0700, Greg Thelen wrote: On Fri, May 25, 2018 at 2:32 PM Arnd Bergmann wrote: > Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends > on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this lead

[PATCH] mm: convert scan_control.priority int => byte

2018-05-28 Thread Greg Thelen
ed byte) rather than u8 to allow for loops like: do { ... } while (--sc.priority >= 0); This reduces sizeof(struct scan_control) from 96 => 88 bytes (x86_64), which saves some stack. scan_control.priority field order is changed to occupy otherwise unused padding.

Re: [PATCH] iw_cxgb4: add INFINIBAND_ADDR_TRANS dependency

2018-06-07 Thread Greg Thelen
On Mon, Jun 4, 2018 at 4:07 PM Jason Gunthorpe wrote: > > On Thu, May 31, 2018 at 02:40:59PM -0400, Doug Ledford wrote: > > On Wed, 2018-05-30 at 21:03 -0700, Greg Thelen wrote: > > > On Wed, May 30, 2018 at 4:01 PM Jason Gunthorpe wrote: > > > > > > >

[PATCH 1/5] nvme: depend on INFINIBAND_ADDR_TRANS

2018-04-25 Thread Greg Thelen
NVME_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/nvme/host/Kconfig | 2 +- 1 file changed, 1

[PATCH 2/5] nvmet-rdma: depend on INFINIBAND_ADDR_TRANS

2018-04-25 Thread Greg Thelen
NVME_TARGET_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/nvme/target/Kconfig | 2 +- 1 file changed, 1

[PATCH 3/5] ib_srpt: depend on INFINIBAND_ADDR_TRANS

2018-04-25 Thread Greg Thelen
INFINIBAND_SRPT code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/infiniband/ulp/srpt/Kconfig | 2 +- 1 file

[PATCH 4/5] cifs: smbd: depend on INFINIBAND_ADDR_TRANS

2018-04-25 Thread Greg Thelen
CIFS_SMB_DIRECT code depends on INFINIBAND_ADDR_TRANS provided symbols. So declare the kconfig dependency. This is necessary to allow for enabling INFINIBAND without INFINIBAND_ADDR_TRANS. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- fs/cifs/Kconfig | 2 +- 1 file changed, 1 insertion

[PATCH 5/5] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-25 Thread Greg Thelen
Allow INFINIBAND without INFINIBAND_ADDR_TRANS because fuzzing has been finding fair number of CM bugs. So provide option to disable it. Signed-off-by: Greg Thelen Cc: Tarick Bedeir --- drivers/infiniband/Kconfig | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH 5/5] IB: make INFINIBAND_ADDR_TRANS configurable

2018-04-25 Thread Greg Thelen
On Wed, Apr 25, 2018 at 7:13 PM Bart Van Assche wrote: > On Wed, 2018-04-25 at 15:34 -0700, Greg Thelen wrote: > > Allow INFINIBAND without INFINIBAND_ADDR_TRANS because fuzzing has been > > finding fair number of CM bugs. So provide option to disable it. > > > >

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-27 Thread Greg Thelen
On Fri, Mar 22, 2019 at 11:15 AM Roman Gushchin wrote: > > On Thu, Mar 07, 2019 at 08:56:32AM -0800, Greg Thelen wrote: > > Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in > > memory.stat reporting") memcg dirty and writeback counters are mana

[PATCH] shmem, memcg: enable memcg aware shrinker

2020-05-31 Thread Greg Thelen
ng memcg shrink_slab()") Cc: # 4.19+ Signed-off-by: Greg Thelen --- mm/shmem.c | 61 +++--- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index bd8840082c94..e11090f78cb5 100644 --- a/mm/s

  1   2   3   >