Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1720818pxj; Wed, 19 May 2021 12:17:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx96upUImkhdhMMIAxtdQ9Zt1GuXHwBRNo7p+0ZMjGR5ChtHZ2F7Qyzr8wgxfbMjyAy1spE X-Received: by 2002:aa7:c4c2:: with SMTP id p2mr622706edr.144.1621451870092; Wed, 19 May 2021 12:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621451870; cv=none; d=google.com; s=arc-20160816; b=nr/OH//HIbxmbHeCPkBF7cSYpbPIjX0S5F2XZKtuiCfrzU/8n8zplGilu1oboxxGNl Ejw3DRKa/fifyGRe6t1/kI9AevpS2BdWPpJE8UqWlBmHu4VgSzF+lRbNJeleoBWnEhkd U2HDacd2rLX61/6Q7halk6kZyDTLWdaAMtyardq5EiNu82wiYCVorEJJjisG9u0imewz VBLkJZYm6TDIqqOzZzJkSKX41Vd0ryiyzlYKuQkmpK3OoHFDM0JoMVeR7MQI69rei5kx 4yKLszyG2zNb2iX7f1vwEBOB0arN16ye0LGw6vFaTBG4VQ20ydJ/eIhHotojVblZfdl+ WxEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pquk/6hS/kUBJI6wBupcpd3wsozPl6QCwcSHApqiotk=; b=JwmBC3CoaHBc7INvOC6tP0TuYE2PfNSWk+GFGjfKwZIslhFeyj0WAmqG/fm+zTnnom XPJnPrT33IOvkO7kJ/HOTfMFlpcGjqlINbfWW0h7U5fJudU7uchda8KFeT3WjbnugPU8 vxMNxd64MLaUIApb1zU1xAy2YW+hhawTJtF6gyPoH2Tmr6/1u96HdfN4xwL7x7HY+ioB C8SfrGpneArhFTDZgAezT3h37/ip1gq/V3WspfB+RrM0109yQxQZ7gg0Akri3GMWKFCS dIyEELqgzFdNy2eFJA5jL6awVhj6DrxIV4CweFN1Ur7vSJvF+n8NsBdKp6Kiux6fYZwZ 2lng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ENeG+u/Q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si463414ejf.428.2021.05.19.12.17.24; Wed, 19 May 2021 12:17:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ENeG+u/Q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344927AbhESFvY (ORCPT + 99 others); Wed, 19 May 2021 01:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348977AbhESFrB (ORCPT ); Wed, 19 May 2021 01:47:01 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9A1AC06175F; Tue, 18 May 2021 22:45:29 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id 69so6384246plc.5; Tue, 18 May 2021 22:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pquk/6hS/kUBJI6wBupcpd3wsozPl6QCwcSHApqiotk=; b=ENeG+u/QDIj3yLynV5fnIKjU6rM5P0avKoBg32VlDitUUL5U82jg/an64kRFgM1MYG Uy9t1H9FMdFRl23tKwkQcYbAr/zx8Kh+dDm634HIYMx5zC4ieU8si62IXGgqv+jVMHF2 JBoO9xjQKkkJB811cCdTUzAlecsMm1uFb89cj3qGSusufyRmWb+k9GOVAb3EVxsVGMNk MrHnZRz92N9T2MNyzJuxMtbYO0jlW9xt8YClXEa2z3m3G8t9Ve0OZrqydndiVdBdZghs rqPMFjJ4EXSi/4OANxgZbbPAMjEFPxhPB+km0GoYN7Pr1+WXVJ08I4mWsReudW37tdum 4tHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pquk/6hS/kUBJI6wBupcpd3wsozPl6QCwcSHApqiotk=; b=V6sDLWyywS+a11SV/0sRRA71NN7nnORRim7KBCIkqe8J355cjTrmQDOHY7yfICiBSp M0JOQsSunwDOf1xTl/otodiDKpBmxjHZnQLwKyska2vdjOKwpOVBeuT3Xu0RTAVv+z9N cDyqsiUjROesWMAj2GMHvo97h+WNwfUtgGf3W6tlTqxczUun0ds4DskJ+Yopn1UhtF+t loKE0vKXhx+/Nqo5DV7j2PQlQqk4953SO6eygGcQLiezMRTn2pojpEbFGDVKUNaDkNea 80Ki0xXuu+/YaAyhxV0UbNqjYdHD3kUUcVYOfpO0dSahCk7pCdBmm40HjycspS1nhpP1 UHyg== X-Gm-Message-State: AOAM531PI+iJNJaIIOl/4Eq8JIfMbGMU0oOyS75ZOsJIiQkXWuqR+lC/ UJDnszrMK4XU9Toi8DPhnMw= X-Received: by 2002:a17:90a:1b45:: with SMTP id q63mr9851522pjq.195.1621403129164; Tue, 18 May 2021 22:45:29 -0700 (PDT) Received: from hyeyoo ([121.135.181.35]) by smtp.gmail.com with ESMTPSA id n30sm14487343pgd.8.2021.05.18.22.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 22:45:28 -0700 (PDT) Date: Wed, 19 May 2021 14:45:20 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: Nathan Chancellor , akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, rientjes@google.com, penberg@kernel.org, cl@linux.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, naresh.kamboju@linaro.org, clang-built-linux@googlegroups.com, linux-next@vger.kernel.org, ndesaulniers@google.com, lkft-triage@lists.linaro.org, sfr@canb.auug.org.au, arnd@arndb.de, Marco Elver Subject: Re: [PATCH v3] mm, slub: change run-time assertion in kmalloc_index() to compile-time Message-ID: <20210519054520.GB26916@hyeyoo> References: <20210511173448.GA54466@hyeyoo> <20210515210950.GA52841@hyeyoo> <41c65455-a35b-3ad3-54f9-49ca7105bfa9@suse.cz> <20210518003859.GC80297@hyeyoo> <71416382-2e4c-5e03-df9c-265fda41c2de@suse.cz> <20210518111814.GA114501@hyeyoo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 18, 2021 at 01:34:07PM +0200, Vlastimil Babka wrote: > On 5/18/21 1:18 PM, Hyeonggon Yoo wrote: > > On Tue, May 18, 2021 at 11:28:17AM +0200, Vlastimil Babka wrote: > >> On 5/18/21 2:43 AM, Nathan Chancellor wrote: > >> > On 5/17/2021 5:38 PM, Hyeonggon Yoo wrote: > >> >> On Sat, May 15, 2021 at 11:34:49PM -0700, Nathan Chancellor wrote: > >> >>> This should work I think: > >> >> > >> >> compiled well with clang-10.0.1, clang-11.0.0, > >> >> and gcc-10.2.0 with x86_64 default config. > >> >> > >> >> is the condition CONFIG_CLANG_VERSION > 110000, > >> >> not including 110000 it self? > >> > >> Good spot. > > > > Thanks! > > > >> > Ah sorry, that should definitely be >= :( > >> > > >> > That is what I get for writing an email that late... in reality, it probably > >> > won't matter due to the availability of 11.0.1 and 11.1.0 but it should > >> > absolutely be changed. > >> > > >> > I have not given Nick's patch a go yet but would something like this be > >> > acceptable? > >> > >> Yes. > > > > You mean Nick's patch to added with Nathan's code? > > No, I thought Nathan was asking about his own proposal. I don't think Nick's > patch that adds 26 index solves the issue. Nathan's proposal fixed with '>=' is OK. Ah, Okay! I sent the patch. Thanks, Hyeonggon