From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07B9BC3ABCB for ; Mon, 12 May 2025 19:06:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 400906B000A; Mon, 12 May 2025 15:06:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 388CB6B0082; Mon, 12 May 2025 15:06:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FF5A6B0083; Mon, 12 May 2025 15:06:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id F1FE96B000A for ; Mon, 12 May 2025 15:06:18 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E45D9807D1 for ; Mon, 12 May 2025 19:06:18 +0000 (UTC) X-FDA: 83435186436.19.D4A2392 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by imf29.hostedemail.com (Postfix) with ESMTP id 0E1F3120011 for ; Mon, 12 May 2025 19:06:16 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=g2+p1kCL; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of jyescas@google.com designates 209.85.160.178 as permitted sender) smtp.mailfrom=jyescas@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747076777; a=rsa-sha256; cv=none; b=4EaNuMxjMsFn36xn4+oacUF3XBAwuuaDJTmWH8284+EJXlOHT9Fj2kgtePS9Od9G1otwuP fBRmhQ0Q6giLaLySnvJqJHYZKuBRPf4HlqXAfNFmZpeDPMjNyu8jqV2W8eKBMp8SgOypxH ir7YqtSdNeq4zio76mZ9G3EGeDQlab4= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=g2+p1kCL; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of jyescas@google.com designates 209.85.160.178 as permitted sender) smtp.mailfrom=jyescas@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747076777; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=SlaBIoGCDj2YBbfCjPUIByxs5tgRMLkhs+czsg2KRtk=; b=PrYlzgCbpjc4gAwk39cf9sY+Ja7961aDXlIXPmAUkb5h3TqvScq0r0Ycc4bUGd0EktjnUk d8sHNgYhNM61y+TyQ1wS9o4Hq/1DLLPoszJ3B2VbSX0GVbu23ffU3/16hdbNxlxWIkIgU0 +VF2Xh5bfadKdiIqpBRMyB46/4TayDU= Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-48b7747f881so60811cf.1 for ; Mon, 12 May 2025 12:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1747076776; x=1747681576; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SlaBIoGCDj2YBbfCjPUIByxs5tgRMLkhs+czsg2KRtk=; b=g2+p1kCLUKtyEqEkgcCTgDTJx1dALUSCp4UzlAm6NvfY6vhoA8qqUjifAuPIl1jPW8 QW7/+ssen6ArRfpKElchk92Xbpq0C5nHQZ0s1kGDBh53bDOVNw5wMQ9AcgArBbngvep8 AlT7hgk237tlJIS088IVlmF/gY4j3uJ8iMeo88eIKlFoMFtOzFKnV11HnTO4jRt7SKgt jFGQPc2hNjWjozVMdc8S2gjkVJllLzMLyo/DwXeP7VxQjmUpzwO7TKDd8v5hPDClmOnx KoZ+IixXnHw5i1BJw2T7fBFAKXiMstr2nuAnqXwobfJTBA+uG16qK/dy47wK1VX/M9ay r4EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747076776; x=1747681576; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SlaBIoGCDj2YBbfCjPUIByxs5tgRMLkhs+czsg2KRtk=; b=gkG04ZXoC9komNcK6+doJLwiOvyPd2D0rMJwt/yXYMHDaqIRJywGfxeyQ10dtVVrlY Q8n00ZqN/FdByn/Gud4SuW1OUnAHO6UszFRAdMyQuON6xnk6mqEAFMBN9Rz/RhlGdipj Lr+fdSfm+sEnn1VW8DCN/rEsAiDEN+qZcw8w2+Z0lqgF2lFZoUPaG2RJnlg1XROZGABo gdSbRuqWYPDpypDc9jWxaia+cz9LAchjl6rxc9BYk6sZNTX8c3IuM2APAB+1bwWBwIIW 42TNv7zzCj5fn1+yUH5XqwyJ+NTzbSzJkRUovVRjVUdxrmRBEahBhCRSt0Q4e6vNujtb Yzxw== X-Forwarded-Encrypted: i=1; AJvYcCWtg7+0CwQ2eHUxHMBEQQenBOmxVIX47Zwhw1dxx4gStdLvyCWiTxnn5jD6dfQsHBj8NNCUkDC5sQ==@kvack.org X-Gm-Message-State: AOJu0Yx9kFhRGuB0HEHzCxP5+oxwjierqqaO4EG4aBeS4UcAxVioRllF vuh3eB1XKU147cX0rxMJvgKOyyXSWvlYFl7WpuwyktS9xGT5e22ZhvNmOxlLr5K+sU4u2A+fge4 vn9Zsqepl5jSKJtZpf9CI+hPYQ4VlWEBYeiHfcyn8MP7fVXQ8qMdG9qk= X-Gm-Gg: ASbGncsucCwKtjeFthy14z3o8NEZ22u4rUqJaOiPBtlunx0ToUcMnbMTKAAGO8RMX+R Nb1M9g9hT4NseIIZQ3DNb8/S48LMOHJ8jcZoPrBCPQdL/nsNCFpmz++mSYZc0lLsz0z46o28Miq WG2Til3k1UQ7LU0bwrjtVpQuoKBk+F0d9y1BbPIxqwan+5K6nPHQWngrfZnQTjRQku4A== X-Google-Smtp-Source: AGHT+IFBi76c9HCC/BtyKlkS54kVR4sp9uMVllBKhvHfQguku4lD2jIfu3weJnzfKcjV/mhhBSWJ2xr+zru+2lPauaI= X-Received: by 2002:a05:622a:164e:b0:48a:5b89:473b with SMTP id d75a77b69052e-4948828457bmr338911cf.7.1747076775897; Mon, 12 May 2025 12:06:15 -0700 (PDT) MIME-Version: 1.0 References: <202505091548.FuKO4b4v-lkp@intel.com> In-Reply-To: From: Juan Yescas Date: Mon, 12 May 2025 12:06:03 -0700 X-Gm-Features: AX0GCFvQOxojxpWtWcort3iToPLLjrZi4pJYvap4QTgX7RWu9TBjkS13M4u_8O8 Message-ID: Subject: Re: [akpm-mm:mm-unstable 333/334] include/linux/mmzone.h:1816:8: warning: left shift count is negative To: Philip Li Cc: kernel test robot , oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 0E1F3120011 X-Stat-Signature: diirjf76i8s3cs67xw517u8dhf8dtycq X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1747076776-851646 X-HE-Meta: U2FsdGVkX1/Ci82omuSzI9GkSl9P631f3gnQn4NEU18mLC6k8lhSgs/aZSmQ4wPVUNT2JyboAWeR0SQ3GisJg2mfMwN+/WslzWNSlCwXWfIaEEXQtWfyM/4EhejGu1eWeZKw719glP4+ylCRPZZ15I63EbJYeOpP/cFi6VdqPfvynusFBdEQQMM9czne+sjidDbFTWy65fBQir253ZfBmsri1kpyDVUyNSCsQpW2Jmzsf3UJmwt0UakV7eHXlk7G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fAkA5H0LIMiaY7+Yowxk1zHCKxRDGxDZGnzJEiQ13+vHRX X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sun, May 11, 2025 at 6:10=E2=80=AFPM Philip Li wro= te: > > On Fri, May 09, 2025 at 01:43:33PM -0700, Juan Yescas wrote: > > On Fri, May 9, 2025 at 12:49=E2=80=AFAM kernel test robot wrote: > > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git m= m-unstable > > > head: 930c125f685d7e8eef566fcd563390b76a28d824 > > > commit: 16994f2b09a22523885d371caa59f17999686805 [333/334] mm: add CO= NFIG_PAGE_BLOCK_ORDER to select page block order > > > config: powerpc64-randconfig-003-20250509 (https://download.01.org/0d= ay-ci/archive/20250509/202505091548.FuKO4b4v-lkp@intel.com/config) > > > compiler: powerpc64-linux-gcc (GCC) 10.5.0 > > > reproduce (this is a W=3D1 build): (https://download.01.org/0day-ci/a= rchive/20250509/202505091548.FuKO4b4v-lkp@intel.com/reproduce) > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a new = version of > > > the same patch/commit), kindly add following tags > > > | Reported-by: kernel test robot > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202505091548.FuKO4b4v= -lkp@intel.com/ > > > > > > All warnings (new ones prefixed by >>): > > > > > > In file included from include/vdso/const.h:5, > > > from include/linux/const.h:4, > > > from include/linux/bits.h:5, > > > from include/linux/ratelimit_types.h:5, > > > from include/linux/printk.h:9, > > > from include/asm-generic/bug.h:22, > > > from arch/powerpc/include/asm/bug.h:116, > > > from include/linux/bug.h:5, > > > from include/linux/mmdebug.h:5, > > > from include/linux/mm.h:6, > > > from mm/sparse.c:5: > > > mm/sparse.c: In function 'usemap_size': > > > >> include/linux/mmzone.h:1816:8: warning: left shift count is negati= ve [-Wshift-count-negative] > > > 1816 | ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGE= BLOCK_BITS) > > > | ^~ > > > include/uapi/linux/const.h:51:40: note: in definition of macro '__= KERNEL_DIV_ROUND_UP' > > > 51 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)= ) > > > | ^ > > > mm/sparse.c:301:9: note: in expansion of macro 'BITS_TO_LONGS' > > > 301 | return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(un= signed long); > > > | ^~~~~~~~~~~~~ > > > mm/sparse.c:301:23: note: in expansion of macro 'SECTION_BLOCKFLAG= S_BITS' > > > 301 | return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(un= signed long); > > > | ^~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > vim +1816 include/linux/mmzone.h > > > > > > d41dee369bff3b Andy Whitcroft 2005-06-23 1814 > > > 835c134ec4dd75 Mel Gorman 2007-10-16 1815 #define SECTION_BLOCK= FLAGS_BITS \ > > > d9c2340052278d Mel Gorman 2007-10-16 @1816 ((1UL << (PFN= _SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS) > > > 835c134ec4dd75 Mel Gorman 2007-10-16 1817 > > > > > > > Thanks for testing, > > > > The reason for the warning is because CONFIG_PAGE_BLOCK_ORDER > > > CONFIG_ARCH_FORCE_MAX_ORDER. > > > > This config: powerpc64-randconfig-003-20250509 > > (https://download.01.org/0day-ci/archive/20250509/202505091548.FuKO4b4v= -lkp@intel.com/config) > > > > is not respecting the range config below. Should the test make sure > > that the ranges are valid? > > Thanks for the information, I will check the bot side to resolve the prob= lem. > > Sorry for the false positive. > Thanks Philip, I tried to reproduce the issue in an ARM64 build by modifying the .config manually $ vim .config $ cat .config | grep MAX_ORDER CONFIG_ARCH_FORCE_MAX_ORDER=3D8 $ cat .config | grep PAGE_BLOCK CONFIG_PAGE_BLOCK_ORDER=3D10 $ make -j40 ARCH=3Darm64 CROSS_COMPILE=3Daarch64-linux-gnu- CALL scripts/checksyscalls.sh However, after I built the kernel, the CONFIG_PAGE_BLOCK_ORDER got overridden with a valid value. $ cat .config | grep MAX_ORDER CONFIG_ARCH_FORCE_MAX_ORDER=3D10 $ cat .config | grep PAGE_BLOCK CONFIG_PAGE_BLOCK_ORDER=3D10 Is there a parameter or configuration in the test that indicates not to fix the .config files? > > > > config PAGE_BLOCK_ORDER > > int "Page Block Order" > > range 1 10 if !ARCH_FORCE_MAX_ORDER > > default 10 if !ARCH_FORCE_MAX_ORDER > > range 1 ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER > > default ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER > > > > I can add a check in include/linux/pageblock-flags.h > > > > /* > > * The PAGE_BLOCK_ORDER, which defines the order for the number of page= s > > * that can have a migrate type, must be less or equal to the MAX_PAGE_= ORDER, > > * which defines the max order of pages to be allocated by the buddy al= locator. > > */ > > BUILD_BUG_ON_MSG(PAGE_BLOCK_ORDER > MAX_PAGE_ORDER, > > "MAX_PAGE_ORDER must be >=3D PAGE_BLOCK_ORDER"); > > > > Is there any preference? > > > > > :::::: The code at line 1816 was first introduced by commit > > > :::::: d9c2340052278d8eb2ffb16b0484f8f794def4de Do not depend on MAX_= ORDER when grouping pages by mobility > > > > > > :::::: TO: Mel Gorman > > > :::::: CC: Linus Torvalds > > > > > > -- > > > 0-DAY CI Kernel Test Service > > > https://github.com/intel/lkp-tests/wiki > >