From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Glisse Subject: Re: [PATCH 4/5] mm/memcontrol: allow to uncharge page without using page->lru field Date: Mon, 10 Jul 2017 12:54:21 -0400 Message-ID: <20170710165420.GC4964@redhat.com> References: <20170703211415.11283-1-jglisse@redhat.com> <20170703211415.11283-5-jglisse@redhat.com> <20170704125113.GC14727@dhcp22.suse.cz> <20170705143528.GB3305@redhat.com> <20170710082805.GD19185@dhcp22.suse.cz> <20170710153222.GA4964@redhat.com> <20170710160444.GB7071@dhcp22.suse.cz> <20170710162542.GB4964@redhat.com> <20170710163651.GD7071@dhcp22.suse.cz> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A1BA23D956 Content-Disposition: inline In-Reply-To: <20170710163651.GD7071@dhcp22.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , David Nellans , Dan Williams , Balbir Singh , Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org On Mon, Jul 10, 2017 at 06:36:52PM +0200, Michal Hocko wrote: > On Mon 10-07-17 12:25:42, Jerome Glisse wrote: > [...] > > Bottom line is that we can always free and uncharge device memory > > page just like any regular page. >=20 > OK, this answers my earlier question. Then it should be feasible to > charge this memory. There are still some things to handle. E.g. how do > we consider this memory during oom victim selection (this is not > accounted as an anonymous memory in get_mm_counter, right?), maybe others. > But the primary point is that nobody pins the memory outside of the > mapping. At this point it is accounted as a regular page would be (anonymous, file or share memory). I wanted mm_counters to reflect memcg but i can untie that. Like i said at this point we are unsure how usage of such memory will impact thing so i wanted to keep all thing as if it was regular memory to avoid anuything to behave too much differently. J=E9r=F4me -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f198.google.com (mail-qk0-f198.google.com [209.85.220.198]) by kanga.kvack.org (Postfix) with ESMTP id E132D44084A for ; Mon, 10 Jul 2017 12:54:26 -0400 (EDT) Received: by mail-qk0-f198.google.com with SMTP id h194so2797275qke.3 for ; Mon, 10 Jul 2017 09:54:26 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id q16si2038102qke.344.2017.07.10.09.54.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 09:54:26 -0700 (PDT) Date: Mon, 10 Jul 2017 12:54:21 -0400 From: Jerome Glisse Subject: Re: [PATCH 4/5] mm/memcontrol: allow to uncharge page without using page->lru field Message-ID: <20170710165420.GC4964@redhat.com> References: <20170703211415.11283-1-jglisse@redhat.com> <20170703211415.11283-5-jglisse@redhat.com> <20170704125113.GC14727@dhcp22.suse.cz> <20170705143528.GB3305@redhat.com> <20170710082805.GD19185@dhcp22.suse.cz> <20170710153222.GA4964@redhat.com> <20170710160444.GB7071@dhcp22.suse.cz> <20170710162542.GB4964@redhat.com> <20170710163651.GD7071@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170710163651.GD7071@dhcp22.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , David Nellans , Dan Williams , Balbir Singh , Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org On Mon, Jul 10, 2017 at 06:36:52PM +0200, Michal Hocko wrote: > On Mon 10-07-17 12:25:42, Jerome Glisse wrote: > [...] > > Bottom line is that we can always free and uncharge device memory > > page just like any regular page. > > OK, this answers my earlier question. Then it should be feasible to > charge this memory. There are still some things to handle. E.g. how do > we consider this memory during oom victim selection (this is not > accounted as an anonymous memory in get_mm_counter, right?), maybe others. > But the primary point is that nobody pins the memory outside of the > mapping. At this point it is accounted as a regular page would be (anonymous, file or share memory). I wanted mm_counters to reflect memcg but i can untie that. Like i said at this point we are unsure how usage of such memory will impact thing so i wanted to keep all thing as if it was regular memory to avoid anuything to behave too much differently. Jerome -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754621AbdGJQyv (ORCPT ); Mon, 10 Jul 2017 12:54:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52734 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754053AbdGJQyt (ORCPT ); Mon, 10 Jul 2017 12:54:49 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1BA23D956 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jglisse@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A1BA23D956 Date: Mon, 10 Jul 2017 12:54:21 -0400 From: Jerome Glisse To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , David Nellans , Dan Williams , Balbir Singh , Johannes Weiner , Vladimir Davydov , cgroups@vger.kernel.org Subject: Re: [PATCH 4/5] mm/memcontrol: allow to uncharge page without using page->lru field Message-ID: <20170710165420.GC4964@redhat.com> References: <20170703211415.11283-1-jglisse@redhat.com> <20170703211415.11283-5-jglisse@redhat.com> <20170704125113.GC14727@dhcp22.suse.cz> <20170705143528.GB3305@redhat.com> <20170710082805.GD19185@dhcp22.suse.cz> <20170710153222.GA4964@redhat.com> <20170710160444.GB7071@dhcp22.suse.cz> <20170710162542.GB4964@redhat.com> <20170710163651.GD7071@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170710163651.GD7071@dhcp22.suse.cz> User-Agent: Mutt/1.8.2 (2017-04-18) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 10 Jul 2017 16:54:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 10, 2017 at 06:36:52PM +0200, Michal Hocko wrote: > On Mon 10-07-17 12:25:42, Jerome Glisse wrote: > [...] > > Bottom line is that we can always free and uncharge device memory > > page just like any regular page. > > OK, this answers my earlier question. Then it should be feasible to > charge this memory. There are still some things to handle. E.g. how do > we consider this memory during oom victim selection (this is not > accounted as an anonymous memory in get_mm_counter, right?), maybe others. > But the primary point is that nobody pins the memory outside of the > mapping. At this point it is accounted as a regular page would be (anonymous, file or share memory). I wanted mm_counters to reflect memcg but i can untie that. Like i said at this point we are unsure how usage of such memory will impact thing so i wanted to keep all thing as if it was regular memory to avoid anuything to behave too much differently. Jérôme