Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932969AbWL1KN5 (ORCPT ); Thu, 28 Dec 2006 05:13:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932979AbWL1KN5 (ORCPT ); Thu, 28 Dec 2006 05:13:57 -0500 Received: from caramon.arm.linux.org.uk ([217.147.92.249]:3076 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932963AbWL1KNz (ORCPT ); Thu, 28 Dec 2006 05:13:55 -0500 Date: Thu, 28 Dec 2006 10:13:11 +0000 From: Russell King To: Gordon Farquharson Cc: Linus Torvalds , David Miller , ranma@tdiedrich.de, tbm@cyrius.com, Peter Zijlstra , andrei.popa@i-neo.ro, Andrew Morton , hugh@veritas.com, nickpiggin@yahoo.com.au, arjan@infradead.org, Linux Kernel Mailing List Subject: Re: [PATCH] mm: fix page_mkclean_one Message-ID: <20061228101311.GA9672@flint.arm.linux.org.uk> Mail-Followup-To: Gordon Farquharson , Linus Torvalds , David Miller , ranma@tdiedrich.de, tbm@cyrius.com, Peter Zijlstra , andrei.popa@i-neo.ro, Andrew Morton , hugh@veritas.com, nickpiggin@yahoo.com.au, arjan@infradead.org, Linux Kernel Mailing List References: <20061226.205518.63739038.davem@davemloft.net> <20061227.165246.112622837.davem@davemloft.net> <97a0a9ac0612272032uf5358c4qf12bf183f97309a6@mail.gmail.com> <97a0a9ac0612272120g144d2364n932d6f66728f162e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97a0a9ac0612272120g144d2364n932d6f66728f162e@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 32 On Wed, Dec 27, 2006 at 10:20:20PM -0700, Gordon Farquharson wrote: > I have run the program a few times, and the output is pretty > consistent. However, when I increase the target size, the difference > between the expected and actual values is larger. > > Written as (749)935(738) > Chunk 1113 corrupted (1-1455) (2965-323) > Expected 89, got 93 This is not the corruption Linus is after. Note that the corruption starts at offset '1'. Also note that: 89 = 1113 & 255 93 = 1113 & 255 | (1113 >> 8) and if you look at glibc's memset() function, you'll notice that's exactly what you expect if you pass a non-8bit value to it. Ergo, what you're seeing is utterly expected given glibc's memset() implementation on ARM. Fixing Linus' test program to pass nr & 255 to memset results in clean passes on 2.6.9 on TheCus N2100 (IOP8032x) and 2.6.16.9 StrongARM machines (as would be expected.) -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: - 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/