From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161149AbXDEEsF (ORCPT ); Thu, 5 Apr 2007 00:48:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161152AbXDEEsF (ORCPT ); Thu, 5 Apr 2007 00:48:05 -0400 Received: from mail.suse.de ([195.135.220.2]:50612 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161149AbXDEEsE (ORCPT ); Thu, 5 Apr 2007 00:48:04 -0400 Date: Thu, 5 Apr 2007 06:47:56 +0200 From: Nick Piggin To: Linus Torvalds Cc: Hugh Dickins , Andrew Morton , Linux Memory Management List , tee@sgi.com, holt@sgi.com, Andrea Arcangeli , Linux Kernel Mailing List Subject: Re: [rfc] no ZERO_PAGE? Message-ID: <20070405044756.GJ11192@wotan.suse.de> References: <20070329075805.GA6852@wotan.suse.de> <20070330024048.GG19407@wotan.suse.de> <20070404033726.GE18507@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 04, 2007 at 08:35:30AM -0700, Linus Torvalds wrote: > > > On Wed, 4 Apr 2007, Nick Piggin wrote: > > > > Shall I do a more complete patchset and ask Andrew to give it a > > run in -mm? > > Do this trivial one first. See how it fares. OK. > Although I don't know how much -mm will do for it. There is certainly not > going to be any correctness problems, afaik, just *performance* problems. > Does anybody do any performance testing on -mm? > > That said, talking about correctness/performance problems: > > > + page_table = pte_offset_map_lock(mm, pmd, address, &ptl); > > + if (likely(!pte_none(*page_table))) { > > inc_mm_counter(mm, anon_rss); > > lru_cache_add_active(page); > > page_add_new_anon_rmap(page, vma, address); > > Isn't that test the wrong way around? > > Shouldn't it be > > if (likely(pte_none(*page_table))) { > > without any logical negation? Was this patch tested? Yeah, untested of course. I'm having problems booting my normal test box, so the main point of the patch was to generate some discussion (which worked! ;)). Thanks, Nick