Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2350468rwb; Thu, 27 Jul 2023 06:07:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlE2RRUSNj14C6cwqOffq5hzgJkp/bR9wX7JZQEfpJJps9kBviP0a0tplFs/rDAGnGep3fRC X-Received: by 2002:a05:6e02:118f:b0:347:223f:92f4 with SMTP id y15-20020a056e02118f00b00347223f92f4mr4587943ili.24.1690463238975; Thu, 27 Jul 2023 06:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690463238; cv=none; d=google.com; s=arc-20160816; b=q/AYm1nubU4bqbNvkJd8QMV+1+ecp4cBv/l0IgMT5oXnjgsgbm3+2qI4Am5z2YbMKg UiDlulz4641pLTvODVdj2VEsRJeUw8vry4pwMFxV3W/It3JyykUGQWPwKrgSj8BqmZrt qez5JqeAgDUunW/t8zMlQ+j0Bg8LA4g+tXL8rgpZ5cPo7BsvJP05UV2tjSlnD29Tlgrq lQOfK+SAVZAXPsD6E6wTcI9xVg26vZCzoIfskbL3+NxAoZlyH7Estf/7uOUqvzJXqmCE opCeCMMAPORq6OETZXgfu62KL5y7DwOo5VLYJhLs632lKtWPduWyqFDXofh5KWrqLckC CTKw== 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:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=XMGzMo0D9w2lh2SUTyPSHMy4PaBaVyHmeoSWJwj5o98=; fh=6Tz+TfjL+k3bV+0yhz8YSp1jsJ9dQ6MAoy8aR//zwe0=; b=P4HajbSZwX/TvR85pGaK500Sd45E6BJMNqLdDBkVIUGnqqgdBaxeTgdC1pO3oSdFRq kK+t/TvqEqNw9g69tYVrHsiSUNxw0kkADLc7C+B9oXMtHyIm5tbjxwU2X/HsZys+Qke+ bUe6ODcn+WPhrkBWZpTnjG+zJisy9qzn1HiHSK4KfRUuozYgQehyMd3pOQHD+iM24Lk7 jm9Pb/GW8quhv0Wcy5lfAuL43qTOC73F9sIxhFUee+o+D8wMGNUvANwL2wgwzGTXByG9 R2VyA2E4PgXJ5frC3YzPkaE9LG7vz+77fFOTphv4C+PNbylY0+OLFMtw1rBL/Eu8pK27 lKlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=g5Gw9jVr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a17090a540a00b00263ad259d9esi1368102pjh.0.2023.07.27.06.07.06; Thu, 27 Jul 2023 06:07:18 -0700 (PDT) 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=@collabora.com header.s=mail header.b=g5Gw9jVr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbjG0Ltu (ORCPT + 99 others); Thu, 27 Jul 2023 07:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232372AbjG0Ltt (ORCPT ); Thu, 27 Jul 2023 07:49:49 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 590411FDA; Thu, 27 Jul 2023 04:49:48 -0700 (PDT) Received: from [192.168.100.7] (unknown [59.103.218.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8C5206607057; Thu, 27 Jul 2023 12:49:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1690458587; bh=NC/0VSOPtAjML62vw26aYCCXLVTxIUCUUJS7zYvPPmc=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=g5Gw9jVrYVSkBWRsfZ85xC9Pv7jkspf3yqXuJtKBaFobfMRIpTo5ZqoUhbu8S/A/r KiRk5MZNS3mhjapKKtlHZC4pnXcxUCGVOv65GG+DMRFdp+oV8tCZZIXzIIEDFXmIWv mFczKH20FJBTCjgqeo0glCPBkHqZ21380lsTwdi2jxEihxtgS+kAGxfJzcqIsOEJui Pu8DJACPMXee76vw9s8ZB8oxlGZcA8Eu9490oMKx6BEmSG5Mu82JOWWv67EfzSlLCC Z3hwEQXPjDVKWqrtsmnQHurlKRdV1d9eZA8LV5n/VW89lQ2b4iG4sDAeLH4/7ocJd5 GmEh8qxav/0Rw== Message-ID: <82de29db-85fc-0d44-ef41-3ccfe0d3d2c1@collabora.com> Date: Thu, 27 Jul 2023 16:49:36 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Muhammad Usama Anjum , Peter Xu , David Hildenbrand , Andrew Morton , Andrei Vagin , Danylo Mocherniuk , Paul Gofman , Cyrill Gorcunov , Mike Rapoport , Nadav Amit , Alexander Viro , Shuah Khan , Christian Brauner , Yang Shi , Vlastimil Babka , "Liam R . Howlett" , Yun Zhou , Suren Baghdasaryan , Alex Sierra , Matthew Wilcox , Pasha Tatashin , Axel Rasmussen , "Gustavo A . R . Silva" , Dan Williams , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Greg KH , kernel@collabora.com, =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: Re: [PATCH v26 2/5] fs/proc/task_mmu: Implement IOCTL to get and optionally clear info about PTEs Content-Language: en-US To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= References: <20230727093637.1262110-1-usama.anjum@collabora.com> <20230727093637.1262110-3-usama.anjum@collabora.com> From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 7/27/23 4:46 PM, Michał Mirosław wrote: > On Thu, 27 Jul 2023 at 11:37, Muhammad Usama Anjum > wrote: > [...] >> --- a/include/uapi/linux/fs.h >> +++ b/include/uapi/linux/fs.h > [...] >> +/* >> + * struct pm_scan_arg - Pagemap ioctl argument >> + * @size: Size of the structure >> + * @flags: Flags for the IOCTL >> + * @start: Starting address of the region >> + * @end: Ending address of the region >> + * @walk_end: Ending address of the visited memory is returned >> + * (This helps if entire range hasn't been visited) > > "Address where the scan stopped (written by kernel). walk_end == end > informs that the scan completed." I'll update comment. > > (To make the userspace life easier, we can copy `end` (only) in case > of full scan completion, so that the tag is retained.) Lets be consist and not copy tag from end to walk_end as we'll now know about tag every time. It should be the responsibility of the user to deal with it. > >> + * @vec: Address of page_region struct array for output >> + * @vec_len: Length of the page_region struct array >> + * @max_pages: Optional limit for number of returned pages (0 = disabled) >> + * @category_inverted: PAGE_IS_* categories which values match if 0 instead of 1 >> + * @category_mask: Skip pages for which any category doesn't match >> + * @category_anyof_mask: Skip pages for which no category matches >> + * @return_mask: PAGE_IS_* categories that are to be reported in `page_region`s returned >> + */ -- BR, Muhammad Usama Anjum