Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp214716lqp; Mon, 10 Jun 2024 01:25:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOyHJlPBRmik6uHU5qC0WaOAyC86suyie+ZyYWGw+7V4XFBhTZHgffchD29ahdub2THkGBmXdjHcy5gRMN6e5HrGaQrdbIr4AVk7RlMw== X-Google-Smtp-Source: AGHT+IGFZDJ5Qii4skIe33CiOwjMCh4KX9GpCNDNs/rDHYumweDJclME0iDbjNyQY4hVYQMa3rOB X-Received: by 2002:a50:bb49:0:b0:57a:2f68:fe7b with SMTP id 4fb4d7f45d1cf-57c509898c8mr5284372a12.31.1718007920881; Mon, 10 Jun 2024 01:25:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718007920; cv=pass; d=google.com; s=arc-20160816; b=PYo/i3D/8hC2uweTOX4EZtU56VfEacMb1dkeiqyfV+ZEGJ1UTk6DVH4Kp1n85j931x Ky9Op/gWpx6+1i4Owe7eQ/7+lNJmygAsgHsBrixJBjWqljuMHBF5O1W3Kfu6OFJMERO5 5303PKSjO9Hx3RLFg5gpAK5EWT13Ka9+WC1Uz1sX6Z55vfPQCfbSXdqYullsIZ25J1lo KapnzNDu8Dl42cH6hOnKvVO7l69FQPSz3JVpV+/Ab9nGkFkjDAcLMkdsi925IhvEJflo t4q/riJdJA81ST3XoGNj4nvnTU2zN+u2+4KGHETvFv6MpO8Peo9RssCktW9Eu0yJoyiA BcCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=2Dcfclgq21FPBivkIafQK0Leu/x2r2ds/GVh9jZYY4k=; fh=fSssBzujPUnZwlW+JpEb22ip8o9a2rc0oXYxkFa0zGk=; b=BMB3W3+rfrBX89wdd7L5qUNkb/sv/kA4PBA7x3pe24qPJFYUcffL2sv9QyCYcfzVLu u/lWtuRv8vOx/22bxXH0U33aokRQeqcN9+UsS769NA/J16CA0jBzHz5wjmLOVO5GV2i/ sBaV/zipn79+GA6vCADpjrmRxi9s51jze45IPsNRUDes4pcKnCHpt8RiF5h6vgKPqmmH 4adga4CyP5+n4Hbtx1sAaYaojhMLb2RVkKnOkhynyQhaAjOnjEzgYzQIYpiYuzkwkGn+ np8Jt26f4nRBGVV7WZ8a3Q+aXQ3e5lh7VlyzE4pGUTwbWQC0mMKvdN1a6wm6iXLgvfZm b6pA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HTq3qqMh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-207839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae260c18si4611561a12.515.2024.06.10.01.25.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 01:25:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HTq3qqMh; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-207839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C239F1F229B1 for ; Mon, 10 Jun 2024 08:23:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C12D61FF6; Mon, 10 Jun 2024 08:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HTq3qqMh" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F369A626CB for ; Mon, 10 Jun 2024 08:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718007804; cv=none; b=nWkT5E43pNBTapnb4E9Gs32NkEOUYhrFEVeo3W+dav3rbTa/3CsvDU/8GxYRtgt+bm0UcuAXyIaAdmpgJVZi7feAmVIUSo8FORHRDJTSfhRATuach9z+NaSSHJI+XkoZrcqZy/jpZJjPlCa2CpbRFaS26I7nIXGQddMP5jFK3N8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718007804; c=relaxed/simple; bh=7H6rvGaT4DFEOtMwhT/kKnnO2qwSElK624H5zwb18C8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rr+swfXtGVJbHMEmnGD4xsrnGDQtXrVchBDhR/FDqy/65HikG8PfcvCeOfU2/A9xxqR2slZKaBxBI/xSKirLBV54dry6C5UAKYpIDvmdekwDrQqIIkRPNW10x1fKzBn1rui96uxZWm1QmYDFSsCh/upndRtHTUPZkHvlt1SKPPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HTq3qqMh; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718007801; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=2Dcfclgq21FPBivkIafQK0Leu/x2r2ds/GVh9jZYY4k=; b=HTq3qqMh/PoPjbnWgwf3kkwr0WSOHzNf9TTSIBrA9p83zQkMq2PjyVF+XHGw/HbvalxwjS NJgfH2+DlE3qbh8t7teVipb0M9+ZAuT/QA3JmwP4kxuoxMmulATKzUxPnNve2mM+0igLZI CP7Vqwtq6IbzpRUKWtxLR+KvLgTt8eY= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-490-7Y6RllCoOwiFGJNL2JCt_g-1; Mon, 10 Jun 2024 04:23:17 -0400 X-MC-Unique: 7Y6RllCoOwiFGJNL2JCt_g-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-35e7cce4c32so2778242f8f.3 for ; Mon, 10 Jun 2024 01:23:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718007796; x=1718612596; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=2Dcfclgq21FPBivkIafQK0Leu/x2r2ds/GVh9jZYY4k=; b=BFmmoDth4yP8GVxwcwUu21LOEDOlLFqPoiLDdyXOXeHYUYq3DPIq2cRVv68d66y4CL qOhL4s1aR+2Hy8NAELT3bhOCGEZuiYhJOb41ynUmkMAXkHisavGx8kXdb1nKf4j1xsaN OcGRMGT1JUn4e+8BlxAiqhDFeg3HlkUWYpap7+d+yig8WkOSI6itTUfNyNzjvIf89E5e l0c4izt7ex7pHlniQog/M5Ut/oensXVkodj7U0q1kDmpoS5hMqbAiwYNmR7fzIRlLDkF 6HWtI39xt/FX550mpVElIzRxtw/0tUPHR51AjtGNevJxvhlTD9qsUkzb7II5st/vqfAS d+eA== X-Gm-Message-State: AOJu0Ywadk8VisdUjOpTZb3gET3C1yQKb+8JqctNOgLtv6GjrtefrdQ5 9X9TfR4jutX1RcJFBu00OZNxnxuonFP3wXdk3HKpG6CBgoO6aG5S81UeqLQQHfHKN/Yb5/GZdtj YyCC8I/vk6NAcELW+UhJ/arUIl0Lc45bkSwAySVcabNECqFiO6jp9P8bkBTTgpwyD32LuZg== X-Received: by 2002:a5d:5f48:0:b0:35f:1f29:3f with SMTP id ffacd0b85a97d-35f1f2900a2mr3240089f8f.44.1718007796201; Mon, 10 Jun 2024 01:23:16 -0700 (PDT) X-Received: by 2002:a5d:5f48:0:b0:35f:1f29:3f with SMTP id ffacd0b85a97d-35f1f2900a2mr3240068f8f.44.1718007795781; Mon, 10 Jun 2024 01:23:15 -0700 (PDT) Received: from ?IPV6:2a09:80c0:192:0:5dac:bf3d:c41:c3e7? ([2a09:80c0:192:0:5dac:bf3d:c41:c3e7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35ef5d69e71sm10308617f8f.65.2024.06.10.01.23.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jun 2024 01:23:14 -0700 (PDT) Message-ID: <962615d7-d20f-43c2-84a4-a7b99d8dfeca@redhat.com> Date: Mon, 10 Jun 2024 10:23:13 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/2] mm/highmem: make nr_free_highpages() return "unsigned long" To: Wei Yang Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton References: <20240607083711.62833-1-david@redhat.com> <20240607083711.62833-3-david@redhat.com> <20240608005144.ypbq4442bh46tmqb@master> From: David Hildenbrand Content-Language: en-US Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4w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q Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <20240608005144.ypbq4442bh46tmqb@master> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08.06.24 02:51, Wei Yang wrote: > On Fri, Jun 07, 2024 at 10:37:11AM +0200, David Hildenbrand wrote: >> It looks rather weird that totalhigh_pages() returns an >> "unsigned long" but nr_free_highpages() returns an "unsigned int". >> >> Let's return an "unsigned long" from nr_free_highpages() to be >> consistent. >> >> While at it, use a plain "0" instead of a "0UL" in the !CONFIG_HIGHMEM >> totalhigh_pages() implementation, to make these look alike as well. > > I am not sure why not use 0UL for both? See my reply to Oscar, thanks for the review! -- Cheers, David / dhildenb