From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 14 Jan 2005 23:34:11 +0100 From: Andrea Arcangeli Subject: Re: smp_rmb in mm/memory.c in 2.6.10 Message-ID: <20050114223411.GN8709@dualathlon.random> References: <20050114211441.59635.qmail@web14305.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org Return-Path: To: Hugh Dickins Cc: Kanoj Sarcar , Anton Blanchard , Andi Kleen , William Lee Irwin III , linux-mm@kvack.org, davem@redhat.com List-ID: > > As to the smp_rmb() part, I believe it is required; we > > are not talking about compiler reorderings, On Fri, Jan 14, 2005 at 10:09:17PM +0000, Hugh Dickins wrote: > Did need to be considered, but I still agree with > myself that the function call makes it no problem. I believe gcc is learning how to get around function calls, in this case it's a different file that we're calling so it's very unlikely to get us compiler problems. But the real reason of the smp_rmb is the cpu, the compiler not. > as I did when posting the patch to remove it). Woops ... I must have missed it sorry, I owe you an apology! It has been a failry busy week here around (some kernel testing stuff has been going on here, eventually the kernel was not to blame so all completed well ;). > Unless someone sees this differently, I should send a patch to > restore the smp_rmb(), with a longer code comment on what it's for. Sure go ahead. I was thinking the same. Originally the code was more obvious when I did it with two counters, and then Paul improved it with a single counter but now it deserves a bit more of commentary. Thanks Hugh and Kanoj! -- 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/ . Don't email: aart@kvack.org