From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753576Ab1ACCuF (ORCPT ); Sun, 2 Jan 2011 21:50:05 -0500 Received: from thunk.org ([69.25.196.29]:32961 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752996Ab1ACCuC (ORCPT ); Sun, 2 Jan 2011 21:50:02 -0500 Date: Sun, 02 Jan 2011 18:48:01 -0500 Message-Id: To: Christoph Lameter , Pekka Enberg , Matt Mackall , linux-mm@kvack.org cc: linux-kernel@vger.kernel.org Subject: Should we be using unlikely() around tests of GFP_ZERO? From: "Theodore Ts'o" Phone: (781) 391-3464 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Given the patches being busily submitted by trivial patch submitters to make use kmem_cache_zalloc(), et. al, I believe we should remove the unlikely() tests around the (gfp_flags & __GFP_ZERO) tests, such as: - if (unlikely((flags & __GFP_ZERO) && objp)) + if ((flags & __GFP_ZERO) && objp) memset(objp, 0, obj_size(cachep)); Agreed? If so, I'll send a patch... - Ted From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id 550B76B00A2 for ; Sun, 2 Jan 2011 21:50:02 -0500 (EST) Date: Sun, 02 Jan 2011 18:48:01 -0500 Message-Id: Subject: Should we be using unlikely() around tests of GFP_ZERO? From: "Theodore Ts'o" Sender: owner-linux-mm@kvack.org To: Christoph Lameter , Pekka Enberg , Matt Mackall , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org List-ID: Given the patches being busily submitted by trivial patch submitters to make use kmem_cache_zalloc(), et. al, I believe we should remove the unlikely() tests around the (gfp_flags & __GFP_ZERO) tests, such as: - if (unlikely((flags & __GFP_ZERO) && objp)) + if ((flags & __GFP_ZERO) && objp) memset(objp, 0, obj_size(cachep)); Agreed? If so, I'll send a patch... - Ted -- 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 policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org