Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5872662rwl; Mon, 9 Jan 2023 00:35:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXs70/hrpdD1LndTCVEKDGOjPiq9XuhI9ukPxU7E+N6rTlRcPrUf0KHYR6Lo3+t1UqKWruEZ X-Received: by 2002:a17:906:cd1a:b0:801:d0bc:f616 with SMTP id oz26-20020a170906cd1a00b00801d0bcf616mr72492129ejb.62.1673253349663; Mon, 09 Jan 2023 00:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673253349; cv=none; d=google.com; s=arc-20160816; b=EimT93cZQi3thsYus3bzclNqtTqIooRL6S7VIwSsnonInUfsAIMOvbqQTC3uev8zsi wHGYP9a8j5MujotoSvlheoxsKrigT84IAymeelaF3Z/0gVA2Tg4Pjl5+xjRuiWQoEsUc Wtcobhm46TwhsJAVGsXfPLVPqNjpbuSlLlAMenm/SQRRgmqKfWDVSnVS26SKOwccvjsr t1Z8FhCcD9MTUm2lNfMsjlXvPH7wqJVX/oyCjGAw8Lep6J+TCY2Xgr1HuWdebHBmbgMc X4malzAPNEIvvIs1J7RwgFMnwaoHbLh7VuICXD/VzFnLH5tNgNde/RyUTRqxMNbDAo3Y g5gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=SVp8yLY7DCe2qLwsvuHHLAbl1dGoybQYwVuHEDJuma4=; b=EhzuSi0f3n1rwd/60J2x+hVl1H97Ik3u/eIxaPwAK5KlUOnFajacpuC5fm01hffimU XaksjrS8WExNnbPbrwGQcLHb8gZ6wgYoLZgKTvnR4zmBNxdRZfhi/c9RlNy37bwuyJzB bPWtkfoe5gBHAhIAJpkpz99pRVf5tY0Yh6PFtEuUfQMe8XalcH61IgQ6i/FxX/in5XFo pepBn8NHsbn5dKBxqrUAIYPclNarvTrSIP+lzQqRCHOHhp/e3a+14YvsZ8U2gQqeqEAg t3kP29FjC+RCUo2G3yG8LBtEbI5Z0U8e+yK9hEX2eevrGlqybuSwloNhLVLgIYCa86a8 gslg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvmhKigE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a17090668ce00b007309e8d567fsi6688036ejr.145.2023.01.09.00.35.36; Mon, 09 Jan 2023 00:35:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvmhKigE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233780AbjAIIFk (ORCPT + 54 others); Mon, 9 Jan 2023 03:05:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233477AbjAIIFh (ORCPT ); Mon, 9 Jan 2023 03:05:37 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22D44FCDA for ; Mon, 9 Jan 2023 00:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673251489; 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; bh=SVp8yLY7DCe2qLwsvuHHLAbl1dGoybQYwVuHEDJuma4=; b=LvmhKigEhE6/zPnIieoK1raZGBmPvTAiPcGWfyRtk0yHxjfdKInAy/idXiDA25fg0+Mej+ hoACyeUIdXVkecP0SxvrtLW10PpuK/dUXkaiiGov0cUxjTQ7VzjKY/RA3p5nuQSAgJN0Wc hNvIXiw17+mSouhgxGRrX6/G2zUfj/s= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-74-drveKNWJMZ2qd2wojFtcpw-1; Mon, 09 Jan 2023 03:04:47 -0500 X-MC-Unique: drveKNWJMZ2qd2wojFtcpw-1 Received: by mail-wm1-f70.google.com with SMTP id c66-20020a1c3545000000b003d355c13229so6876844wma.0 for ; Mon, 09 Jan 2023 00:04:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SVp8yLY7DCe2qLwsvuHHLAbl1dGoybQYwVuHEDJuma4=; b=rD69jNu2Q+7f+aGlHS5sHBMySaqC0ZAhmQ4l6ewQ0sNF7ouWRuDLefaENVTBrerjko DNHhMdePlnTg1aSvTmWWk5MFdvc5lu08Im3+JIXaqp1maXxjttgndKlloWMx2hGHZEkO P8YhEsru8Vy8amJizY8OT3XnX1Ttg+NNAGfL1k8HiHRmBOvIXbpJWKonB/XCovxt0+Xl wvpfR481Li73v9jSgLoiF3fOIB/rkxAtMDV6rVTgsaE9yT4O45G/gh1JaQrnBI5sgB4R brFi6k0PbhjojuubmFRit1VAn6xy5zWYOuN5IeOmAeYhZjmrq2pWXRKl1Un+LfUmR1h3 fOJg== X-Gm-Message-State: AFqh2kp7qjCuit9O7Xphy64GYv+GGcI4gZc6QYNY71FQG/N/QZeEtC6r 8zX37e9VKSgpYXKwf9PvFAKtqqb5idJuKDlHUiNwZ9mq7OXzExg4tnCa3A8zTsWqGw9EbssClgr s+RhOOJ3Y5BFYLvLLsi/ZEjvi X-Received: by 2002:a05:600c:3ac3:b0:3d1:cfcb:7d19 with SMTP id d3-20020a05600c3ac300b003d1cfcb7d19mr54883745wms.32.1673251486357; Mon, 09 Jan 2023 00:04:46 -0800 (PST) X-Received: by 2002:a05:600c:3ac3:b0:3d1:cfcb:7d19 with SMTP id d3-20020a05600c3ac300b003d1cfcb7d19mr54883732wms.32.1673251486123; Mon, 09 Jan 2023 00:04:46 -0800 (PST) Received: from [192.168.3.108] (p5b0c66da.dip0.t-ipconnect.de. [91.12.102.218]) by smtp.gmail.com with ESMTPSA id e18-20020a05600c4e5200b003d9876aa04asm12410490wmq.41.2023.01.09.00.04.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Jan 2023 00:04:45 -0800 (PST) Message-ID: Date: Mon, 9 Jan 2023 09:04:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 2/3] mm/mprotect: Use long for page accountings and retval Content-Language: en-US To: Peter Xu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Kravetz , Muchun Song , Nadav Amit , Andrea Arcangeli , James Houghton , Axel Rasmussen , Andrew Morton References: <20230104225207.1066932-1-peterx@redhat.com> <20230104225207.1066932-3-peterx@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.01.23 20:22, Peter Xu wrote: > On Thu, Jan 05, 2023 at 09:44:16AM +0100, David Hildenbrand wrote: >> I'm wondering if we should just return the number of changed pages via a >> separate pointer and later using an int for returning errors -- when >> touching this interface already. >> >> Only who's actually interested in the number of pages would pass a pointer >> to an unsigned long (NUMA). >> >> And code that expects that there never ever are failures (mprotect, NUMA) >> could simply check for WARN_ON_ONCE(ret). >> >> I assume you evaluated that option as well, what was your conclusion? > > Since a single long can cover both things as retval, it's better to keep it > simple? Thanks, > Fine with me. -- Thanks, David / dhildenb