Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752109AbbG2FMZ (ORCPT ); Wed, 29 Jul 2015 01:12:25 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:48359 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbbG2FMX (ORCPT ); Wed, 29 Jul 2015 01:12:23 -0400 X-AuditID: cbfee68d-f79106d00000728c-cf-55b860b4b7da From: PINTU KUMAR To: "'Mel Gorman'" Cc: akpm@linux-foundation.org, corbet@lwn.net, vbabka@suse.cz, gorcunov@openvz.org, mhocko@suse.cz, emunson@akamai.com, kirill.shutemov@linux.intel.com, standby24x7@gmail.com, hannes@cmpxchg.org, vdavydov@parallels.com, hughd@google.com, minchan@kernel.org, tj@kernel.org, rientjes@google.com, xypron.glpk@gmx.de, dzickus@redhat.com, prarit@redhat.com, ebiederm@xmission.com, rostedt@goodmis.org, uobergfe@redhat.com, paulmck@linux.vnet.ibm.com, iamjoonsoo.kim@lge.com, ddstreet@ieee.org, sasha.levin@oracle.com, koct9i@gmail.com, cj@linux.com, opensource.ganesh@gmail.com, vinmenon@codeaurora.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pm@vger.kernel.org, qiuxishi@huawei.com, Valdis.Kletnieks@vt.edu, cpgs@samsung.com, pintu_agarwal@yahoo.com, vishnu.ps@samsung.com, rohit.kr@samsung.com, iqbal.ams@samsung.com, pintu.ping@gmail.com, pintu.k@outlook.com References: <1437114578-2502-1-git-send-email-pintu.k@samsung.com> <1437366544-32673-1-git-send-email-pintu.k@samsung.com> <20150720082810.GG2561@suse.de> <02c601d0c306$f86d30f0$e94792d0$@samsung.com> <20150720175538.GJ2561@suse.de> <05af01d0c47f$3337ccd0$99a76670$@samsung.com> <20150722140530.GK2561@suse.de> In-reply-to: <20150722140530.GK2561@suse.de> Subject: RE: [PATCH v3 1/1] kernel/sysctl.c: Add /proc/sys/vm/shrink_memory feature Date: Wed, 29 Jul 2015 10:41:10 +0530 Message-id: <030e01d0c9bd$20e1df60$62a59e20$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQHY5cNOMq5UvRQ3bZTjI+k7dza6/AFNHk19Afg71h0CXcnK6wMxKbwAA02R4YcCBZpTbp1wbduA Content-language: en-us X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0xbZRjG853znQuNjccOxicOp41GbRAGo+zFGUdMFk/cZjYNiTHqVtgJ EKDUFgjGRFnKENjaIIWOdQQxA9ylrtICgc2wUuplIQtIIShIg8rGkHUgBBydOtudmfDf87y3 3/PHy9OqTjaBL9CXSka9rkjNKrAzNv2jF7uP9GXvWA0nQovLyYJrwYxgzvspggXfCzBafQXD zPVUuN9bxcGdkVUKrnqWKbjoPgA3VqwYzp8ws3Am3EDBz/MtEVs7y8AX1e0YApdbWAg67zOw avEjsN25ieAP818MdK4tcXB86ncMIU/EjtQEGJhcsGNYD01HEHctHKzbryCobu+iYN58HMNA zSwFZ/3TNIw1T3IQ/vJbBNa5DgrGlpYxnDlmRRDoOU2Dq8fLQaN1BsFQ0zLK0og2fxstDt1e osWA1UKJ/Y4ZTlz+832xamCKE9vcZWKVP8SIN+oHKdF9oZYV3SsNnFgXGqfEH5rvYXFu/BQl tl47JM76PPhg4juKl49KRQXlkjHllSOK/MYeYtiIq5hs6mcqUZOqDsXwREgn5oVWVtZbyWjQ FdEKXiWcQ+Rqdzv9/9DnXadoudGByFehUSSbECKWiWu4DvE8KzxHvvMqowuxgpoM/7324BIt tHJkdXKFkhcGKDI4UhfpcHyMkESWyqLzW4Rs8luvDMPCs6R5wo6iJ5VCJgn+kxctK4XHyF1b EEc1LWiIq/97StbbiccZepjzKdJ3fRHJEd4l1ot+Rp6JJw2zv3LRBEToUpDRoUuMzBLIus33 ID4REonb+/DO42Tw3E+4HhHHJrRjE9qxCe3YhGhD+AKKkw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YfGNv2aXAJI5SeNIaIaIA10E7ulzRHdoWQKzHk/ZY/UrGQP+9WLLUjOKeQk33K5H MUs5o8Nji8ZYWs6swPM1Y1RMk0wa9nZcI+J6Lfa3hv+ZU4nbb/6G4iN8hF3ng5J4zWpcPf4L fRwp3Mus3Mus3Mus3MsQD6LOISxY863ix0bTRrNwMF3kTaLdbEzPt5h8aOnB30ttR72dbwUQ I0Psc/KG9e0GhYQ/IB4yBRCWkWySXP9qNCUv4A99KtgseTZ7sSAGkDZ61ioyJTnfEv0+5pI8 daZmkzZTq9OAJkvHrpZv0PgMCsbIlwifCIJVsD3jCFlCShlSnfF/kJhzjTJUvf2wcMCDUt9I XWRnJbeSvHO5P+5//CVHK4/tT9e90Lt1XeaWNVWcO2WotHHV7u0rk/e8t69T4cmxXHmgTQou fCiiNaVPStLsw68sjqTWIs++qsvZyqzgjs93/6DvGFgRyvmpsYkue/Gstcd0NXKrbq2zqj7y zsFclhILeXUaaRP5vwHwQME/BgQAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2985 Lines: 74 Sorry, for late reply. > -----Original Message----- > From: Mel Gorman [mailto:mgorman@suse.de] > Sent: Wednesday, July 22, 2015 7:36 PM > To: PINTU KUMAR > Cc: akpm@linux-foundation.org; corbet@lwn.net; vbabka@suse.cz; > gorcunov@openvz.org; mhocko@suse.cz; emunson@akamai.com; > kirill.shutemov@linux.intel.com; standby24x7@gmail.com; > hannes@cmpxchg.org; vdavydov@parallels.com; hughd@google.com; > minchan@kernel.org; tj@kernel.org; rientjes@google.com; > xypron.glpk@gmx.de; dzickus@redhat.com; prarit@redhat.com; > ebiederm@xmission.com; rostedt@goodmis.org; uobergfe@redhat.com; > paulmck@linux.vnet.ibm.com; iamjoonsoo.kim@lge.com; ddstreet@ieee.org; > sasha.levin@oracle.com; koct9i@gmail.com; cj@linux.com; > opensource.ganesh@gmail.com; vinmenon@codeaurora.org; linux- > doc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-mm@kvack.org; linux- > pm@vger.kernel.org; qiuxishi@huawei.com; Valdis.Kletnieks@vt.edu; > cpgs@samsung.com; pintu_agarwal@yahoo.com; vishnu.ps@samsung.com; > rohit.kr@samsung.com; iqbal.ams@samsung.com; pintu.ping@gmail.com; > pintu.k@outlook.com > Subject: Re: [PATCH v3 1/1] kernel/sysctl.c: Add /proc/sys/vm/shrink_memory > feature > > On Wed, Jul 22, 2015 at 06:33:26PM +0530, PINTU KUMAR wrote: > > Dear Mel, thank you very much for your comments and suggestions. > > I will drop this one and look on further improving direct_reclaim and > > compaction. > > Just few more comments below before I close. > > > > Also, during this patch, I feel that the hibernation_mode part in > > shrink_all_memory can be corrected. > > So, can I separately submit the below patch? > > That is instead of hard-coding the hibernation_mode, we can get > > hibernation status using: > > system_entering_hibernation() > > > > Please let me know your suggestion about this changes. > > > > -#ifdef CONFIG_HIBERNATION > > +#if defined CONFIG_HIBERNATION || CONFIG_SHRINK_MEMORY > I was talking about only the following case. Instead of hard coding the hibernation_mode in shrink_all_memory, We can set it at runtime. - .hibernation_mode = 1, + if (system_entering_hibernation()) + sc.hibernation_mode = 1; + else + sc.hibernation_mode = 0; The PM owners should confirm if this is ok. Once confirmed, I will submit the full patch set. +> This appears to be a patch on top of "Add /proc/sys/vm/shrink_memory feature" > so I do not see what would be separately submitted that would make sense. > And we don't need to have /proc/sys/vm/shrink_memory patch for this. However, if required, we can also expose shrink_all_memory() outside the hibernation using the CONFIG_SHRINK_MEMORY. Otherwise, we can neglect other changes. > -- > Mel Gorman > SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/