From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Weiner Subject: Re: [PATCH v2 1/2] mm: Export nr_swap_pages Date: Mon, 7 Dec 2015 13:02:25 -0500 Message-ID: <20151207180225.GA7826@cmpxchg.org> References: <1449244734-25733-1-git-send-email-chris@chris-wilson.co.uk> <20151207134812.GA20782@dhcp22.suse.cz> <20151207164831.GA7256@cmpxchg.org> <20151207170434.GD20774@dhcp22.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from gum.cmpxchg.org (gum.cmpxchg.org [85.214.110.215]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7DD8489F4F for ; Mon, 7 Dec 2015 10:02:41 -0800 (PST) Content-Disposition: inline In-Reply-To: <20151207170434.GD20774@dhcp22.suse.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Michal Hocko Cc: linux-mm@kvack.org, intel-gfx@lists.freedesktop.org, "Goel, Akash" List-Id: intel-gfx@lists.freedesktop.org T24gTW9uLCBEZWMgMDcsIDIwMTUgYXQgMDY6MDQ6MzVQTSArMDEwMCwgTWljaGFsIEhvY2tvIHdy b3RlOgo+IFllcyBidXQgdGhlIGNvdW50ZXIgaXMgYW4gaW50ZXJuYWwgdGhpbmcgdG8gdGhlIE1N IGFuZCB0aGUgb3V0c2lkZSBjb2RlCj4gc2hvdWxkIGhhdmUgbm8gYnVzaW5lc3MgaW4gbWFuaXB1 bGF0aW5nIGl0IGRpcmVjdGx5LgoKVGhlIGNvdW50ZXIgaGFzIGJlZW4gZ2xvYmFsIHNjb3BlIGZv cmV2ZXIuIElmIHlvdSB3YW50IHRvIGVuY2Fwc3VsYXRlCml0LCBzZW5kIGEgcGF0Y2ggeW91cnNl bGYgYW5kIG1ha2UgeW91ciBjYXNlIGluIHRoZSBjaGFuZ2Vsb2cuICBUaGVyZQppcyBubyByZWFz b24gdG8gbWFrZSBwZW9wbGUgd2l0aCByZWFzb25hYmxlIHdvcmtpbmcgY29kZSBqdW1wIHRocm91 Z2gKeW91ciBwZXJzb25hbCBwcmVmZXJlbmNlIGhvb3BzIHRoYXQgaGF2ZSBsaXR0bGUgdG8gZG8g d2l0aCB3aGF0IHRoZWlyCnBhdGNoIGlzIHB1cnN1aW5nLgoKVGhhdCBiZWluZyBzYWlkLCBJJ2Qg TkFLIGFueSBwYXRjaCB0aGF0IHdvdWxkIHR1cm4gYSB0cml2aWFsIGFjY2Vzc29yCmxpa2UgdGhp cyBpbnRvIGEgZnVsbC1ibG93biBmdW5jdGlvbi4gT3VyIGludGVyZmFjZXMgZW5jYXBzdWxhdGUg Zm9yCmNvbnZlbmllbmNlLCBub3Qgb3V0IG9mIGRpc3RydXN0IGFuZCBiYWQgZmFpdGguCl9fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkludGVsLWdmeCBtYWls aW5nIGxpc3QKSW50ZWwtZ2Z4QGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRwOi8vbGlzdHMuZnJl ZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by kanga.kvack.org (Postfix) with ESMTP id 1FE0582F65 for ; Mon, 7 Dec 2015 13:02:46 -0500 (EST) Received: by wmec201 with SMTP id c201so177928520wme.0 for ; Mon, 07 Dec 2015 10:02:45 -0800 (PST) Received: from gum.cmpxchg.org (gum.cmpxchg.org. [85.214.110.215]) by mx.google.com with ESMTPS id i129si25201430wma.2.2015.12.07.10.02.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 10:02:44 -0800 (PST) Date: Mon, 7 Dec 2015 13:02:25 -0500 From: Johannes Weiner Subject: Re: [PATCH v2 1/2] mm: Export nr_swap_pages Message-ID: <20151207180225.GA7826@cmpxchg.org> References: <1449244734-25733-1-git-send-email-chris@chris-wilson.co.uk> <20151207134812.GA20782@dhcp22.suse.cz> <20151207164831.GA7256@cmpxchg.org> <20151207170434.GD20774@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151207170434.GD20774@dhcp22.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Chris Wilson , intel-gfx@lists.freedesktop.org, "Goel, Akash" , linux-mm@kvack.org 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 your case in the changelog. There is no reason to make people with reasonable working code jump through your personal preference hoops that have little to do with what their patch is pursuing. That being said, I'd NAK any patch that would turn a trivial accessor like this into a full-blown function. Our interfaces encapsulate for convenience, not out of distrust and bad faith. -- 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