Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp958523pxp; Wed, 16 Mar 2022 22:39:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO94ElmDZW7lU+9pR6MczFUEN1w/VO87OynvH1IpaZ4HQNQhUH6xqdvFMS+nGBN46W7nl+ X-Received: by 2002:a17:90b:4b0d:b0:1bc:4cdb:ebe3 with SMTP id lx13-20020a17090b4b0d00b001bc4cdbebe3mr3444076pjb.176.1647495546147; Wed, 16 Mar 2022 22:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647495546; cv=none; d=google.com; s=arc-20160816; b=GnP0sWLk4lebesiBGQgPBjqz84z6Sz2zQ+z9QGPHa/SK12bfoMMAJoLiT+Jc1QCmg4 RGam+1meMC4kqBrHgZPJ30HCaII4x+hzwEQZJ7JsCcOqGYe21Bd8vJ93msGPinF1tOMx z3KKS60bG/macBRkwC4IxU5e9ihgeVu3aZbFbNJh9S2EFwJJ9KOjv9lWBb0bee18+m0i nbaCux+z6HMSR6l8JnyAoxZH1NhYUqM+UEOWpwp+bYNC5fmKTNGaJFCjeFbvjbzLwQe9 cVIMvEdiToQ2iuC8/Uu7P40b801xeH0beowGdv3DSfZnNJpWrCQq6mjATu0V921lm4Vm bVMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=WXX0e1rtPtqzAbaDqJ7SUZZQlvXyxK33vKamCalqmY8=; b=A9MNzUtz53FSLeg161A36p38mCLLAxtFPghE/WzRMqFmcB6u0tJ2twIYbEJf6Ae6T2 IgMR3q2D1hqOXMXq7vyPNgRnCNIUyj4YFduR8l/I6s7aNLQSfBZhOWSH8g//J44YMdQ8 Urv0VfmmaDdLgA55paLYralBl7oRUDHGI9cKLAYhmD14MI5P6otnleW+ydnRNPh2pY+r NlcRPrO8bpvyRsvm+vZvvHUtuZxjMiD2WC8qcItIwiwOCi96cN/PEU5bwSIvmvch84gi foQxDS9Jt/70HYK6diVEKxIHdZx9Sp5uIK+Y4QfanniwFsdBpDPCqsrztvOMRL6/hIC8 i6fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=Wr5GCtT9; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o8-20020a170902d4c800b00153d49303e5si2167009plg.6.2022.03.16.22.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:39:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=Wr5GCtT9; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EAE2E13703B; Wed, 16 Mar 2022 21:43:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239893AbiCPVaa (ORCPT + 99 others); Wed, 16 Mar 2022 17:30:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354479AbiCPVaX (ORCPT ); Wed, 16 Mar 2022 17:30:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BDF72654F; Wed, 16 Mar 2022 14:29:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0CBAF61567; Wed, 16 Mar 2022 21:29:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F422EC340F3; Wed, 16 Mar 2022 21:29:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647466147; bh=dI8ATJ23yJ3aOXedIMHJSO6iU/obXw2eqnoCJdxikjo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Wr5GCtT9e8hdgK53WPBSMowNZyqav5DZOjwCi+CegvpI8Ibc/s9bmJivRBw4pYcrJ 9AFhbhCy9kQGddYprYtD7YUYtlBLeQZnwaaapkymeHZ7MT2Vya1P9sC82KsjYBLaEY 61JkNVEMhl+Kr6DtHii92ToLM/hJPEy5CAkiXBSk= Date: Wed, 16 Mar 2022 14:29:06 -0700 From: Andrew Morton To: Charan Teja Kalla Cc: Minchan Kim , , , , , , , , , , "# 5 . 10+" Subject: Re: [PATCH V2,2/2] mm: madvise: skip unmapped vma holes passed to process_madvise Message-Id: <20220316142906.e41e39d2315e35ef43f4aad6@linux-foundation.org> In-Reply-To: <5428f192-1537-fa03-8e9c-4a8322772546@quicinc.com> References: <4f091776142f2ebf7b94018146de72318474e686.1647008754.git.quic_charante@quicinc.com> <20220315164807.7a9cf1694ee2db8709a8597c@linux-foundation.org> <5428f192-1537-fa03-8e9c-4a8322772546@quicinc.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, 16 Mar 2022 19:49:38 +0530 Charan Teja Kalla wrote: > > IMO, it's worth to note in man page. > > > > Or the current patch for just ENOMEM is sufficient here and we just have > to update the man page? I think the "On success, process_madvise() returns the number of bytes advised" behaviour sounds useful. But madvise() doesn't do that. RETURN VALUE On success, madvise() returns zero. On error, it returns -1 and errno is set to indicate the error. So why is it desirable in the case of process_madvise()? And why was process_madvise() designed this way? Or was it always simply an error in the manpage?