From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031319AbdD0MSH (ORCPT ); Thu, 27 Apr 2017 08:18:07 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:25368 "EHLO lhrrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933442AbdD0MRz (ORCPT ); Thu, 27 Apr 2017 08:17:55 -0400 Subject: Question on ___GFP_NOLOCKDEP - Was: Re: [PATCH 1/1] Remove hardcoding of ___GFP_xxx bitmasks To: Michal Hocko References: <20170426133549.22603-1-igor.stoppa@huawei.com> <20170426133549.22603-2-igor.stoppa@huawei.com> <20170426144750.GH12504@dhcp22.suse.cz> CC: , , From: Igor Stoppa Message-ID: <9929419e-c22e-2a9f-a8a6-ad98d5a9da06@huawei.com> Date: Thu, 27 Apr 2017 15:16:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.122.225.51] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0201.5901E167.018E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d43508e060c121f874b6fa55c650f03d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/04/17 18:29, Igor Stoppa wrote: > On 26/04/17 17:47, Michal Hocko wrote: [...] >> Also the current mm tree has ___GFP_NOLOCKDEP which is not addressed >> here so I suspect you have based your change on the Linus tree. > I used your tree from kernel.org I found it, I was using master, instead of auto-latest (is it correct?) But now I see something that I do not understand (apologies if I'm asking something obvious). First there is: [...] #define ___GFP_WRITE 0x800000u #define ___GFP_KSWAPD_RECLAIM 0x1000000u #ifdef CONFIG_LOCKDEP #define ___GFP_NOLOCKDEP 0x4000000u #else #define ___GFP_NOLOCKDEP 0 #endif Then: /* Room for N __GFP_FOO bits */ #define __GFP_BITS_SHIFT (25 + IS_ENABLED(CONFIG_LOCKDEP)) Shouldn't it be either: ___GFP_NOLOCKDEP 0x2000000u or: #define __GFP_BITS_SHIFT (25 + 2 * IS_ENABLED(CONFIG_LOCKDEP)) thanks, igor