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 C1988C433F5 for ; Thu, 21 Apr 2022 20:29:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 29C216B0072; Thu, 21 Apr 2022 16:29:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 24B526B0073; Thu, 21 Apr 2022 16:29:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0ED536B0074; Thu, 21 Apr 2022 16:29:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id F0A996B0072 for ; Thu, 21 Apr 2022 16:29:42 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AE173230FE for ; Thu, 21 Apr 2022 20:29:42 +0000 (UTC) X-FDA: 79382027004.31.B33BFAD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id DECBFA001D for ; Thu, 21 Apr 2022 20:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650572981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iyHvLM1kZClfQZyHehXI1483VYFXZMJL0g/XznGMgYo=; b=eIRsI1VTcrUYZkXzJo/0ffDDZY6rD5osiR4iCu1BA+W03JvWx4Jtqomomfqzu4asAh8Xmj B4OcF6LYp7WCEvu7Ob7CkCPtPDl+IK3X5+EW1guqUjGQKwjTS861TeNuJErXHHmtBNwX/9 PxqcjDcijr/m3444MPnFAIllsqvuBjU= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-10-bJkrPvvwPuWrn4EsM1EFvg-1; Thu, 21 Apr 2022 16:29:40 -0400 X-MC-Unique: bJkrPvvwPuWrn4EsM1EFvg-1 Received: by mail-io1-f71.google.com with SMTP id n9-20020a056602340900b006572c443316so3008198ioz.23 for ; Thu, 21 Apr 2022 13:29:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iyHvLM1kZClfQZyHehXI1483VYFXZMJL0g/XznGMgYo=; b=7igHQubgeoDxIgOk6JDr9LZ2Z4pAqeBIhztlL1gXtJYZ0xknfCPh/lEdQgMFk5GGTb p00jO1x0waWY9FfWikg3w8jG3zbBBCaVy3SsM5/2gaP+/+tnfD6arg+3qKpa0gNcC4uH RhuGPsCyuU+msu1pZ6VIdaggddatTPaYuDMtrSPpMaCl42EiaXD0A/R0ON9w2ANAd8RE P3zHrvRwVpxNNlw4+p/cMWYPEjr/MhMufGgXDIC7Bv+KDwIdqK5x7lVICenQ/vbMBs8P dj3jud1f6xG5s8w5enfu6obqbXL//F62412zafUS2TwqFVRxUf8BfdqOyc4q9FecdFNe mAcQ== X-Gm-Message-State: AOAM5322KfV+z/WStBvayhnymQgT/A2mL997JrGmEel/p8YkmOM46bh1 k2dj7lVdxjR9jAOd2G4CS8Q7/vgF++Sdt+ZNLT1YpG+MTsAyX4AG+Si4gcLuYLBcQ6bK2N2wta4 2mAkF7tOOatc= X-Received: by 2002:a05:6638:2512:b0:32a:a83a:89bc with SMTP id v18-20020a056638251200b0032aa83a89bcmr709017jat.129.1650572979823; Thu, 21 Apr 2022 13:29:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMfhCeTO3TmFWRhK/59JZH7r8xsMx22ynQbxTH/UgnN8PjghYwolhtqMt5mZZxcXf27KCOiw== X-Received: by 2002:a05:6638:2512:b0:32a:a83a:89bc with SMTP id v18-20020a056638251200b0032aa83a89bcmr709011jat.129.1650572979591; Thu, 21 Apr 2022 13:29:39 -0700 (PDT) Received: from xz-m1.local (cpec09435e3e0ee-cmc09435e3e0ec.cpe.net.cable.rogers.com. [99.241.198.116]) by smtp.gmail.com with ESMTPSA id v8-20020a92c808000000b002cd6d94f263sm6691iln.52.2022.04.21.13.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 13:29:39 -0700 (PDT) Date: Thu, 21 Apr 2022 16:29:37 -0400 From: Peter Xu To: Andrew Morton Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? Message-ID: References: <202204211854.p1LJEBHt-lkp@intel.com> <20220421123849.ee76504ffb86254c99b2c0f8@linux-foundation.org> <20220421130225.01b06f5c9b1a4f681df7acd0@linux-foundation.org> MIME-Version: 1.0 In-Reply-To: <20220421130225.01b06f5c9b1a4f681df7acd0@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: DECBFA001D X-Rspam-User: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eIRsI1VT; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf15.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com X-Stat-Signature: 9qkiwy6kbyssn1qmn66xd9yhxj1zw3yo X-HE-Tag: 1650572979-474561 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: On Thu, Apr 21, 2022 at 01:02:25PM -0700, Andrew Morton wrote: > On Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu wrote: > > > > - * file-backed memory. This should only be specified when we will completely > > > - * drop the page in the mm, either by truncation or unmapping of the vma. By > > > - * default, the flag is not set. > > > - */ > > > -#define ZAP_FLAG_DROP_MARKER ((__force zap_flags_t) BIT(0)) > > > - > > > #endif /* _LINUX_MM_H */ > > > _ > > > > > > > Andrew, > > > > It may work, but I have worry that zap_flags_t should still be a common > > struct for mm not hugetlb specific, let's say it's still legal some .c file > > wants to reference it without hugetlb knowledge? > > > > >From that POV, could we perhaps move these chunk into mm_types.h (which > > hugetlb.h includes anyway)? > > > > Sure. ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in > mm.h? Sounds good, thanks! > > > --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix > +++ a/include/linux/mm.h > @@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct * > } > #endif > > -typedef unsigned int __bitwise zap_flags_t; > - > /* > * Whether to drop the pte markers, for example, the uffd-wp information for > * file-backed memory. This should only be specified when we will completely > --- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix > +++ a/include/linux/mm_types.h > @@ -850,4 +850,6 @@ enum fault_flag { > FAULT_FLAG_ORIG_PTE_VALID = 1 << 11, > }; > > +typedef unsigned int __bitwise zap_flags_t; > + > #endif /* _LINUX_MM_TYPES_H */ > _ > -- Peter Xu From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1146513686275306160==" MIME-Version: 1.0 From: Peter Xu To: kbuild-all@lists.01.org Subject: Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? Date: Thu, 21 Apr 2022 16:29:37 -0400 Message-ID: In-Reply-To: <20220421130225.01b06f5c9b1a4f681df7acd0@linux-foundation.org> List-Id: --===============1146513686275306160== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Apr 21, 2022 at 01:02:25PM -0700, Andrew Morton wrote: > On Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu wrote: > = > > > - * file-backed memory. This should only be specified when we will c= ompletely > > > - * drop the page in the mm, either by truncation or unmapping of the= vma. By > > > - * default, the flag is not set. > > > - */ > > > -#define ZAP_FLAG_DROP_MARKER ((__force zap_flags_t) BIT(0)) > > > - > > > #endif /* _LINUX_MM_H */ > > > _ > > > = > > = > > Andrew, > > = > > It may work, but I have worry that zap_flags_t should still be a common > > struct for mm not hugetlb specific, let's say it's still legal some .c = file > > wants to reference it without hugetlb knowledge? > > = > > >From that POV, could we perhaps move these chunk into mm_types.h (which > > hugetlb.h includes anyway)? > > = > = > Sure. ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in > mm.h? Sounds good, thanks! > = > = > --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-requ= ired-fix-fix > +++ a/include/linux/mm.h > @@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct * > } > #endif > = > -typedef unsigned int __bitwise zap_flags_t; > - > /* > * Whether to drop the pte markers, for example, the uffd-wp information= for > * file-backed memory. This should only be specified when we will compl= etely > --- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-i= f-required-fix-fix > +++ a/include/linux/mm_types.h > @@ -850,4 +850,6 @@ enum fault_flag { > FAULT_FLAG_ORIG_PTE_VALID =3D 1 << 11, > }; > = > +typedef unsigned int __bitwise zap_flags_t; > + > #endif /* _LINUX_MM_TYPES_H */ > _ > = -- = Peter Xu --===============1146513686275306160==--