From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754635AbbGPJ26 (ORCPT ); Thu, 16 Jul 2015 05:28:58 -0400 Received: from mx2.parallels.com ([199.115.105.18]:48242 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752396AbbGPJ2y (ORCPT ); Thu, 16 Jul 2015 05:28:54 -0400 Date: Thu, 16 Jul 2015 12:28:41 +0300 From: Vladimir Davydov To: Andres Lagar-Cavilla CC: Andrew Morton , Minchan Kim , Raghavendra K T , Johannes Weiner , Michal Hocko , Greg Thelen , Michel Lespinasse , David Rientjes , Pavel Emelyanov , Cyrill Gorcunov , Jonathan Corbet , , , , , Subject: Re: [PATCH -mm v8 4/7] proc: add kpagecgroup file Message-ID: <20150716092841.GA2001@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.30.4.177] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 15, 2015 at 12:03:18PM -0700, Andres Lagar-Cavilla wrote: > For both /proc/kpage* interfaces you add (and more critically for the > rmap-causing one, kpageidle): > > It's a good idea to do cond_sched(). Whether after each pfn, each Nth > pfn, each put_user, I leave to you, but a reasonable cadence is > needed, because user-space can call this on the entire physical > address space, and that's a lot of work to do without re-scheduling. I really don't think it's necessary. These files can only be read/written by the root, who has plenty ways to kill the system anyway. The program that is allowed to read/write these files must be conscious and do it in batches of reasonable size. AFAICS the same reasoning already lays behind /proc/kpagecount and /proc/kpageflag, which also do not thrust the "right" batch size on their readers. Thanks, Vladimir