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 3BD62C433EF for ; Wed, 16 Mar 2022 21:29:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B323F6B0071; Wed, 16 Mar 2022 17:29:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE2248D0002; Wed, 16 Mar 2022 17:29:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D0CD8D0001; Wed, 16 Mar 2022 17:29:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 89A516B0071 for ; Wed, 16 Mar 2022 17:29:09 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 583CC21038 for ; Wed, 16 Mar 2022 21:29:09 +0000 (UTC) X-FDA: 79251540018.14.9C1793B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id CA88040016 for ; Wed, 16 Mar 2022 21:29:08 +0000 (UTC) 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 012E261562; 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-Rspamd-Queue-Id: CA88040016 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Wr5GCtT9; dmarc=none; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: w4gyuih3q36k9neix1xf6uy4fkftw5h5 X-Rspamd-Server: rspam04 X-HE-Tag: 1647466148-353328 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 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?