From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932652Ab0KRR3Z (ORCPT ); Thu, 18 Nov 2010 12:29:25 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:48392 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755182Ab0KRR3Y convert rfc822-to-8bit (ORCPT ); Thu, 18 Nov 2010 12:29:24 -0500 MIME-Version: 1.0 In-Reply-To: <20101118114902.GJ8135@csn.ul.ie> References: <20101118114902.GJ8135@csn.ul.ie> From: Linus Torvalds Date: Thu, 18 Nov 2010 09:28:27 -0800 Message-ID: Subject: Re: [PATCH 05 of 66] compound_lock To: Mel Gorman Cc: Andrea Arcangeli , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 18, 2010 at 3:49 AM, Mel Gorman wrote: >> + >> +static inline void compound_lock_irqsave(struct page *page, >> +                                      unsigned long *flagsp) >> +{ >> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE >> +     unsigned long flags; >> +     local_irq_save(flags); >> +     compound_lock(page); >> +     *flagsp = flags; >> +#endif >> +} >> + > > The pattern for spinlock irqsave passes in unsigned long, not unsigned > long *. It'd be nice if they matched. Indeed. Just make the thing return the flags the way the normal spin_lock_irqsave() function does. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with ESMTP id A98D56B004A for ; Thu, 18 Nov 2010 12:29:27 -0500 (EST) Received: from mail-yw0-f41.google.com (mail-yw0-f41.google.com [209.85.213.41]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id oAIHSuFE029429 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL) for ; Thu, 18 Nov 2010 09:28:56 -0800 Received: by ywi6 with SMTP id 6so6404ywi.14 for ; Thu, 18 Nov 2010 09:28:51 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20101118114902.GJ8135@csn.ul.ie> References: <20101118114902.GJ8135@csn.ul.ie> From: Linus Torvalds Date: Thu, 18 Nov 2010 09:28:27 -0800 Message-ID: Subject: Re: [PATCH 05 of 66] compound_lock Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: Mel Gorman Cc: Andrea Arcangeli , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: On Thu, Nov 18, 2010 at 3:49 AM, Mel Gorman wrote: >> + >> +static inline void compound_lock_irqsave(struct page *page, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0unsigned long *flagsp) >> +{ >> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE >> + =A0 =A0 unsigned long flags; >> + =A0 =A0 local_irq_save(flags); >> + =A0 =A0 compound_lock(page); >> + =A0 =A0 *flagsp =3D flags; >> +#endif >> +} >> + > > The pattern for spinlock irqsave passes in unsigned long, not unsigned > long *. It'd be nice if they matched. Indeed. Just make the thing return the flags the way the normal spin_lock_irqsave() function does. Linus -- 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