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 28FEDC433FE for ; Wed, 23 Mar 2022 15:48:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A17CC6B0074; Wed, 23 Mar 2022 11:47:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C70F6B0075; Wed, 23 Mar 2022 11:47:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 88F056B0078; Wed, 23 Mar 2022 11:47:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 7CF2C6B0074 for ; Wed, 23 Mar 2022 11:47:59 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 517DA62013 for ; Wed, 23 Mar 2022 15:47:59 +0000 (UTC) X-FDA: 79276081878.03.E76511A Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by imf14.hostedemail.com (Postfix) with ESMTP id 4207510002F for ; Wed, 23 Mar 2022 15:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648050478; x=1679586478; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=6M1M82HPoA8EEVObNR5ULMG0Mtv8/Wfw1Iz63bAEOXA=; b=vrLe9+96KqW89GS0nJowajvw8liTBQfnexOeM2/fl2WH6vkFu0tmYdd5 Sc1fBGtTed+SmpZA6s+7jz0Q/FBhSBIn7AWyj3M1BefNS7ngUYNkc4oud v/2ssPdZxkQZdYoUWaGndzP+S3OrvrXhKttLY4XZE5MSfE+ywMLakpvTK 0=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 23 Mar 2022 08:47:57 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 08:47:56 -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.22; Wed, 23 Mar 2022 08:47:56 -0700 Received: from [10.216.14.252] (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; Wed, 23 Mar 2022 08:47:51 -0700 Message-ID: Date: Wed, 23 Mar 2022 21:17:47 +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 163/227] mm: madvise: skip unmapped vma holes passed to process_madvise Content-Language: en-US To: Michal Hocko , CC: Andrew Morton , , , , , , , , , , References: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> <20220322214648.AB7A1C340EC@smtp.kernel.org> From: Charan Teja Kalla In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 4207510002F X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcdkim header.b=vrLe9+96; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf14.hostedemail.com: domain of quic_charante@quicinc.com designates 199.106.114.39 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com X-Stat-Signature: 1jhe983bo6fspiw5cwfcduzxm14w7ro4 X-HE-Tag: 1648050477-594630 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000144, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 3/23/2022 1:58 PM, Michal Hocko wrote: > On Tue 22-03-22 17:24:58, Minchan Kim wrote: >> On Tue, Mar 22, 2022 at 02:46:48PM -0700, Andrew Morton wrote: >>> From: Charan Teja Kalla >>> Subject: mm: madvise: skip unmapped vma holes passed to process_madvise >>> >>> The process_madvise() system call is expected to skip holes in vma passed >>> through 'struct iovec' vector list. But do_madvise, which >>> process_madvise() calls for each vma, returns ENOMEM in case of unmapped >>> holes, despite the VMA is processed. >>> >>> Thus process_madvise() should treat ENOMEM as expected and consider the >>> VMA passed to as processed and continue processing other vma's in the >>> vector list. Returning -ENOMEM to user, despite the VMA is processed, >>> will be unable to figure out where to start the next madvise. >>> >>> Link: https://lkml.kernel.org/r/4f091776142f2ebf7b94018146de72318474e686.1647008754.git.quic_charante@quicinc.com >> I thought it was still under discussion and Charan will post next >> version along with previous patch >> "mm: madvise: return correct bytes advised with process_madvise" >> >> https://lore.kernel.org/linux-mm/7207b2f5-6b3e-aea4-aa1b-9c6d849abe34@quicinc.com/ > Yes, I am not even sure the new semantic is sensible[1]. We should discuss > that and see all the consequences. Changing the semantic of an existing > syscall is always tricky going back and forth is even worse. Starting the discussion @ https://lore.kernel.org/linux-mm/cover.1648046642.git.quic_charante@quicinc.com/ Thanks, Charan