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 64001C433FE for ; Tue, 15 Mar 2022 14:26:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4C4B8D0002; Tue, 15 Mar 2022 10:26:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CD27A8D0001; Tue, 15 Mar 2022 10:26:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4BAE8D0002; Tue, 15 Mar 2022 10:26:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 9E9C98D0001 for ; Tue, 15 Mar 2022 10:26:18 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 637F560C9B for ; Tue, 15 Mar 2022 14:26:18 +0000 (UTC) X-FDA: 79246845636.06.11A0494 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by imf02.hostedemail.com (Postfix) with ESMTP id 85FAB80005 for ; Tue, 15 Mar 2022 14:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647354377; x=1678890377; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=xf8O2CSFPHkJl2l4dsMsAB+UtUVKliQySS04oxYD/BU=; b=Gv5PKZdev4TKUIMegmwvDZWSJzihFSgR2elWXSXjKwM0zzLpVe+gSMT3 Os2kc9piE3Qx79EsM64Fyn924W1dDKv/W1Po9PqwmDxWqOE/vNHxoCIYP a4E04iTssWcH8pnLbMAJ02wmlen/z+acb9P9NzCWVow7dM81Dwbt8dze9 o=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 15 Mar 2022 07:26:16 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2022 07:26:15 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 15 Mar 2022 07:26:15 -0700 Received: from [10.216.32.215] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 15 Mar 2022 07:26:10 -0700 Message-ID: <3b1626e7-3a32-5733-2a4f-e782c87b8e58@quicinc.com> Date: Tue, 15 Mar 2022 19:56:05 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH V2,0/2]mm: madvise: return correct bytes processed with process_madvise Content-Language: en-US To: Andrew Morton CC: , , , , , , , , , References: <20220311134203.47cbeab087b731bada12d0f1@linux-foundation.org> From: Charan Teja Kalla In-Reply-To: <20220311134203.47cbeab087b731bada12d0f1@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Rspamd-Queue-Id: 85FAB80005 X-Stat-Signature: j747aw1sgt1q3aficc3do53juqc46emo X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcdkim header.b=Gv5PKZde; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf02.hostedemail.com: domain of quic_charante@quicinc.com designates 199.106.114.38 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com X-Rspamd-Server: rspam02 X-HE-Tag: 1647354377-779216 X-Bogosity: Ham, tests=bogofilter, spamicity=0.005043, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Thanks Andrew!! On 3/12/2022 3:12 AM, Andrew Morton wrote: >> With the process_madvise(), always choose to return non zero processed >> bytes over an error. This can help the user to know on which VMA, passed >> in the 'struct iovec' vector list, is failed to advise thus can take the >> decission of retrying/skipping on that VMA. > Thanks, this is not good. > > We should have added userspace tests for process_madvise() along with > the syscall itself. But evidently that was omitted. If someone > decides to contribute such tests, hopefully they will include checks > for these return values. We are happy to contribute here. >