Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-27 Thread Johannes Weiner
On Thu, Aug 27, 2020 at 01:59:41PM +0100, Matthew Wilcox wrote: > On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > > The refactor makes sense to me, but the name is confusing. We're not > > looking for a swap page, we're primarily looking for a file p

Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-26 Thread Johannes Weiner
On Wed, Aug 26, 2020 at 03:54:14PM +0100, Matthew Wilcox wrote: > On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > > On Wed, Aug 19, 2020 at 07:48:44PM +0100, Matthew Wilcox (Oracle) wrote: > > > + return find_get_swap_page(vma-&

Re: [Intel-gfx] [PATCH 6/8] mm: Convert find_get_entry to return the head page

2020-08-26 Thread Johannes Weiner
On Wed, Aug 19, 2020 at 07:48:48PM +0100, Matthew Wilcox (Oracle) wrote: > There are only three callers remaining of find_get_entry(). > find_get_swap_page() is happy to get the head page instead of the subpage. > Add find_subpage() calls to find_lock_entry() and pagecache_get_page() > to avoid aud

Re: [Intel-gfx] [PATCH 5/8] i915: Use find_lock_page instead of find_lock_entry

2020-08-26 Thread Johannes Weiner
On Wed, Aug 19, 2020 at 07:48:47PM +0100, Matthew Wilcox (Oracle) wrote: > i915 does not want to see value entries. Switch it to use > find_lock_page() instead, and remove the export of find_lock_entry(). > > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Joh

Re: [Intel-gfx] [PATCH 4/8] proc: Optimise smaps for shmem entries

2020-08-26 Thread Johannes Weiner
On Wed, Aug 19, 2020 at 07:48:46PM +0100, Matthew Wilcox (Oracle) wrote: > Avoid bumping the refcount on pages when we're only interested in the > swap entries. > > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Johannes Weiner

Re: [Intel-gfx] [PATCH 3/8] mm: Optimise madvise WILLNEED

2020-08-26 Thread Johannes Weiner
Wilcox (Oracle) Acked-by: Johannes Weiner ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-26 Thread Johannes Weiner
On Wed, Aug 19, 2020 at 07:48:44PM +0100, Matthew Wilcox (Oracle) wrote: > The current code does not protect against swapoff of the underlying > swap device, so this is a bug fix as well as a worthwhile reduction in > code complexity. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > mm/memcont

Re: [Intel-gfx] [RFC PATCH 0/5] cgroup support for GPU devices

2019-05-06 Thread Johannes Weiner
On Wed, May 01, 2019 at 10:04:33AM -0400, Brian Welty wrote: > In containerized or virtualized environments, there is desire to have > controls in place for resources that can be consumed by users of a GPU > device. This RFC patch series proposes a framework for integrating > use of existing cgro

Re: [Intel-gfx] [PATCH v2 1/2] mm: Export nr_swap_pages

2015-12-23 Thread Johannes Weiner
On Thu, Dec 10, 2015 at 10:32:42AM +0100, Daniel Vetter wrote: > On Fri, Dec 04, 2015 at 11:09:52AM -0500, Johannes Weiner wrote: > > On Fri, Dec 04, 2015 at 03:58:53PM +, Chris Wilson wrote: > > > Some modules, like i915.ko, use swappable objects and may try to swap &g

Re: [Intel-gfx] [PATCH v3] mm: Export {__}get_nr_swap_pages()

2015-12-17 Thread Johannes Weiner
On Thu, Dec 17, 2015 at 06:15:44PM +, Dave Gordon wrote: > Some modules, like i915.ko, use swappable objects and may try to swap > them out under memory pressure (via the shrinker). Before doing so, > they want to check using get_nr_swap_pages() to see if any swap space > is available as otherw

Re: [Intel-gfx] [PATCH v2 1/2] mm: Export nr_swap_pages

2015-12-07 Thread Johannes Weiner
On Mon, Dec 07, 2015 at 06:10:00PM +, Dave Gordon wrote: > Exporting random uncontrolled variables from the kernel to loaded modules is > not really considered best practice. It would be preferable to provide an > accessor function - which is just what the declaration says we have; the > implem

Re: [Intel-gfx] [PATCH v2 1/2] mm: Export nr_swap_pages

2015-12-07 Thread Johannes Weiner
On Mon, Dec 07, 2015 at 06:04:35PM +0100, Michal Hocko wrote: > Yes but the counter is an internal thing to the MM and the outside code > should have no business in manipulating it directly. The counter has been global scope forever. If you want to encapsulate it, send a patch yourself and make yo

Re: [Intel-gfx] [PATCH v2 1/2] mm: Export nr_swap_pages

2015-12-07 Thread Johannes Weiner
On Mon, Dec 07, 2015 at 02:48:12PM +0100, Michal Hocko wrote: > On Fri 04-12-15 15:58:53, Chris Wilson wrote: > > Some modules, like i915.ko, use swappable objects and may try to swap > > them out under memory pressure (via the shrinker). Before doing so, they > > want to check using get_nr_swap_pa

Re: [Intel-gfx] [PATCH v2 2/2] drm/i915: Disable shrinker for non-swapped backed objects

2015-12-04 Thread Johannes Weiner
kvack.org > Cc: Akash Goel > Cc: sourab.gu...@intel.com Acked-by: Johannes Weiner ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v2 1/2] mm: Export nr_swap_pages

2015-12-04 Thread Johannes Weiner
available as otherwise they will waste time purging the object from the > device without recovering any memory for the system. This requires the > nr_swap_pages counter to be exported to the modules. > > Signed-off-by: Chris Wilson > Cc: "Goel, Akash" > Cc: Johannes We

Re: [Intel-gfx] [PATCH v2] drm/i915: Disable shrinker for non-swapped backed objects

2015-11-26 Thread Johannes Weiner
On Thu, Nov 26, 2015 at 11:25:14AM +, Chris Wilson wrote: > On Wed, Nov 25, 2015 at 03:46:35PM -0500, Johannes Weiner wrote: > > On Wed, Nov 25, 2015 at 08:31:02PM +, Chris Wilson wrote: > > > On Wed, Nov 25, 2015 at 02:06:10PM -0500, Johannes Weiner wrote: > > >

Re: [Intel-gfx] [PATCH v2] drm/i915: Disable shrinker for non-swapped backed objects

2015-11-25 Thread Johannes Weiner
On Wed, Nov 25, 2015 at 08:31:02PM +, Chris Wilson wrote: > On Wed, Nov 25, 2015 at 02:06:10PM -0500, Johannes Weiner wrote: > > On Wed, Nov 25, 2015 at 06:36:56PM +, Chris Wilson wrote: > > > +static bool swap_available(void) > > > +{ > > > + return t

Re: [Intel-gfx] [PATCH v2] drm/i915: Disable shrinker for non-swapped backed objects

2015-11-25 Thread Johannes Weiner
On Wed, Nov 25, 2015 at 06:36:56PM +, Chris Wilson wrote: > If the system has no available swap pages, we cannot make forward > progress in the shrinker by releasing active pages, only by releasing > purgeable pages which are immediately reaped. Take total_swap_pages into > account when countin

Re: [Intel-gfx] [PATCH] memcg, shmem: fix shmem migration to use lrucare. (was: Re: memcontrol.c BUG)

2015-02-03 Thread Johannes Weiner
it is still confusing. > > Fixes: 0a31bc97c80c (mm: memcontrol: rewrite uncharge API) > Cc: sta...@vger.kernel.org # 3.17+ > Reported-by: Chris Wilson > Reported-by: Dave Airlie > Acked-by: Hugh Dickins > Signed-off-by: Michal Hocko Acked-by: Johannes We