From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with ESMTP id DC60C8D003A for ; Mon, 14 Mar 2011 22:59:39 -0400 (EDT) Received: by iyf13 with SMTP id 13so240253iyf.14 for ; Mon, 14 Mar 2011 19:59:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110314194421.6474cfc5.akpm@linux-foundation.org> References: <1299735019.2337.63.camel@sli10-conroe> <20110314144540.GC11699@barrios-desktop> <1300154014.2337.74.camel@sli10-conroe> <20110314192834.8ffeda55.akpm@linux-foundation.org> <20110314194421.6474cfc5.akpm@linux-foundation.org> Date: Tue, 15 Mar 2011 11:59:37 +0900 Message-ID: Subject: Re: [PATCH 2/2 v4]mm: batch activate_page() to reduce lock contention From: Minchan Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Shaohua Li , linux-mm , Andi Kleen , KOSAKI Motohiro , Rik van Riel , mel , Johannes Weiner On Tue, Mar 15, 2011 at 11:44 AM, Andrew Morton wrote: > On Tue, 15 Mar 2011 11:40:46 +0900 Minchan Kim wr= ote: > >> On Tue, Mar 15, 2011 at 11:28 AM, Andrew Morton >> wrote: >> > On Tue, 15 Mar 2011 11:12:37 +0900 Minchan Kim = wrote: >> > >> >> >> I can't understand why we should hanlde activate_page_pvecs specia= lly. >> >> >> Please, enlighten me. >> >> > Not it's special. akpm asked me to do it this time. Reducing little >> >> > memory is still worthy anyway, so that's it. We can do it for other >> >> > pvecs too, in separate patch. >> >> >> >> Understandable but I don't like code separation by CONFIG_SMP for jus= t >> >> little bit enhance of memory usage. In future, whenever we use percpu= , >> >> do we have to implement each functions for both SMP and non-SMP? >> >> Is it desirable? >> >> Andrew, Is it really valuable? >> > >> > It's a little saving of text footprint. __It's also probably faster th= is way - >> > putting all the pages into a pagevec then later processing them won't >> > be very L1 cache friendly. >> > >> > >> >> I am not sure how much effective it is in UP. But if L1 cache friendly >> is important concern, we should not use per-cpu about hot operation. > > It's not due to the percpu thing. =C2=A0The issue is putting 14 pages int= o a > pagevec and then later processing them after the older ones might have > fallen out of cache. > >> I think more important thing in embedded (normal UP), it is a lock laten= cy. >> I don't want to hold/release the lock per page. > > There is no lock on UP builds. > I mean _frequent_ irq disable. But I don't want to bother you due to this issue as I said. It's up to you. If you merge the path as-is, I will help to clean up remained-things. But at least, in my point, I don't want to add frequent irq disable. --=20 Kind regards, Minchan Kim -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org