Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp420589ybe; Mon, 2 Sep 2019 03:52:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIYsiZy5vGNcsK9Q/oRvxux1G3MLO8abkJr0YilBkD9fEmEvXpNX3eaK27RaAMR41TGTsO X-Received: by 2002:a62:cdca:: with SMTP id o193mr14797490pfg.204.1567421566050; Mon, 02 Sep 2019 03:52:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1567421566; cv=pass; d=google.com; s=arc-20160816; b=mDzq2tR2ohZsg8DGoKSOPBamFpYA9+6o7AVFrZxHTgv3ycpZH6hwLlAl7W7T6SPaXl HFl6nAVgM/Uv83Nh2ny3PkKRJ9BrIG5pNiWCYEQqjbsItcTtnhwLQlroSDJOqcz6cPoJ PihK2ZOI+50Kq7kljSp5yDvavgtoJM2D+78x8/C/gg4sc3BsbpdxhSUfXvp5+hOFEHK4 q8Su1my/ODz6oL4Jsa0Jlk97Sfri3RAiZscxi366oqiwVpdXhnTMOpyrYgBDMvKnUaze x3KPj0YwUA8EPphcAlyUKpViJWhBCEvTnuv21Nh91E5VzK1ewW6Cz0Wj10VABUMqjG5X +UzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=NuhtYnzfhusV9OxQzs2EJk2b74vyp3IHqOmQDca5lIU=; b=Ni28l8QWgmx87cg+L0wEa1ZnMeoA9kSn8WahP5LSUrn9D2HShPDUbc0FiyZZ8cyRHR SunQG0mbU9evIRZkAbZeN/iH+jUJ4JI38MrNkIn1anIwVjAc3BaBPdZGHXW3ON3uopEb d7a4HouRskWhPhtgArKNEsg2A9UcAsX6PhSh8Trx+pDi8HK+Q48LC59II3ocDaVfDNEK jRNl1ZF9lz9vY7H5h6aFW4I/a50PxS/1r/hwM7mLA5ry+0ChKSF6lU0tthaKj6751jwt tkN5oMByYn+Rf0nAtNuk48d022d81gn7obZcd2kk8Vo3O90SRQ4uD+Kp8vJzFvbLNhyf oYAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector2 header.b=LStOEI5q; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y30si11224102pga.143.2019.09.02.03.52.31; Mon, 02 Sep 2019 03:52:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector2 header.b=LStOEI5q; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731229AbfIBKuD (ORCPT + 99 others); Mon, 2 Sep 2019 06:50:03 -0400 Received: from mail-eopbgr10056.outbound.protection.outlook.com ([40.107.1.56]:55940 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731192AbfIBKuD (ORCPT ); Mon, 2 Sep 2019 06:50:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cOSaw6d5v4TJKE3QcmR6vQCM0LCKSmwHqA2EJu6FDTlzl6emgs1E5ssnc7roHwEJ4X6ABwL6UHelRl+H4/t7dYKEliBbSmKiYCiCH47qjrsZ6vu1N9hz9vkHXD9+gszi7v2JEpzRDi7n5fzo2TV5c9Z2O488HgIDwVu77jEDFCOvhmGT4OuuxRCNP5SjWqOxc3y6STIo6rEQO240ingnxPU77+3GcyKIHTv2uLIP5+ICOtCq+qDagCxV7sQbc6iWQeqNtliZA5jen2IA61aoQuMkH3t0U1oNTL+WSjiSXWuTCeAmT32lmjUk0e0CZD2Oz9Ta/or1og0Zeog8O8Z/Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NuhtYnzfhusV9OxQzs2EJk2b74vyp3IHqOmQDca5lIU=; b=MYG6+QkVdsaw/9TPUGPPMXnrJkttxymtyy7B4DOEhAg8cm6/hN7snWPvsHQjSOD+cK0g5+iDj+rJ9DkSYZS7is9oOPsqEs3Po+KXBGFSF6OxWdyL0b8falvrirT5CXuV0thtqIvZQSbIlo6gfhc/RMXa4H+M94vAjjBvNIfjaVgdEJYToXaW5nOGP74PPRvK+bfGTgfDWoUUOl+ToC7Ex9Yv8YyaTJi1NMzPnhSDqal0ykLomuuIf+MPiYlDCccnbxuUbZubKpLb5kcuQkz1oe2djCMBu3xG1GWhLorOFnzQCWc2wV6aexWwC+nBKzGGpOdStnGGkc+vch+55u/+/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NuhtYnzfhusV9OxQzs2EJk2b74vyp3IHqOmQDca5lIU=; b=LStOEI5qrkwACLMAvFu3m/mIYvoWYZfd286tcwYqSgtrMHjxRteNlFYjkQVCPD9rlqXiaGoyG6Il1ok7yP2VxH9eFmXG5PQYanag5CG6H6YwERnLswecZ1+OPvBz543Fag4XHEs+6KpGcveiZbAIxmoHMO2jDpJ5Mru2mEH9xOE= Received: from VI1PR05MB4141.eurprd05.prod.outlook.com (10.171.182.144) by VI1PR05MB4895.eurprd05.prod.outlook.com (20.177.51.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2220.21; Mon, 2 Sep 2019 10:49:58 +0000 Received: from VI1PR05MB4141.eurprd05.prod.outlook.com ([fe80::79a3:d971:d1f3:ab6f]) by VI1PR05MB4141.eurprd05.prod.outlook.com ([fe80::79a3:d971:d1f3:ab6f%7]) with mapi id 15.20.2220.020; Mon, 2 Sep 2019 10:49:58 +0000 From: Jason Gunthorpe To: Christoph Hellwig CC: Guenter Roeck , Linus Torvalds , Andrew Morton , =?iso-8859-1?Q?Thomas_Hellstr=F6m?= , Jerome Glisse , Steven Price , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Thomas Hellstrom Subject: Re: [PATCH 2/3] pagewalk: separate function pointers from iterator data Thread-Topic: [PATCH 2/3] pagewalk: separate function pointers from iterator data Thread-Index: AQHVXauzoOyMGt/Rm0+/Xu8LAWoHTqcXL4MAgAAOHoCAABCOAIAAm4cAgAAjgICAAC/DAA== Date: Mon, 2 Sep 2019 10:49:58 +0000 Message-ID: <20190902104955.GB20@mellanox.com> References: <20190828141955.22210-1-hch@lst.de> <20190828141955.22210-3-hch@lst.de> <20190901184530.GA18656@roeck-us.net> <20190901193601.GB5208@mellanox.com> <20190902055156.GA24116@mellanox.com> <20190902075859.GA29137@lst.de> In-Reply-To: <20190902075859.GA29137@lst.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR01CA0036.eurprd01.prod.exchangelabs.com (2603:10a6:208:69::49) To VI1PR05MB4141.eurprd05.prod.outlook.com (2603:10a6:803:4d::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 53469947-dbde-4e13-b9a6-08d72f934c4a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:VI1PR05MB4895; x-ms-traffictypediagnostic: VI1PR05MB4895: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 01480965DA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(199004)(189003)(86362001)(186003)(4326008)(478600001)(8936002)(36756003)(7736002)(305945005)(71190400001)(71200400001)(256004)(6512007)(14454004)(6436002)(81166006)(81156014)(8676002)(53936002)(316002)(26005)(102836004)(14444005)(33656002)(2906002)(6246003)(76176011)(54906003)(6506007)(386003)(66476007)(66556008)(64756008)(66446008)(6116002)(66946007)(3846002)(52116002)(11346002)(476003)(2616005)(486006)(25786009)(446003)(7416002)(229853002)(6486002)(1076003)(6916009)(66066001)(99286004)(5660300002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB4895;H:VI1PR05MB4141.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: u3yP2zgBzHURzB9tJhA+7SX5ivEUZ0RwAuvSIBwod6Bd4lLddC4gbzx0hy6BMQ0J95S7RoGfD0g3pLQr2JC/bRymEarJ8YJNgSORJfdff/McSAcw9b9WGBNZfWssEbXPHpkp9dhdEJK13FAFjAZ/+dEvcrwm9/q9T53DX52cJxyNl+Zf3dTbut0QBcrQzdeqe8Swh0hYsA7pBVna8gGdrcXTLx7HcSIpICLuqhhnFluxAQFgiogiebCNpqA0z0DDRdAHgpdW7496NDEIxLYpG3g2kRbn9S/Wfw9PJVKRz4r6C8GwnrCSUpulA+z90xoQCks/SisPGGGWUt9bWxYrGIaU1vgTYg6vH3CPaHZ+6BxSYrtA6oI8T84CH659PiWsYNNyEb1pFhJGXnHJyrExflI8ahMKyQMy2UpG38+GUkQ= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-ID: <0E3FE41A0CB6E74EA4443B039BEC2BBA@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53469947-dbde-4e13-b9a6-08d72f934c4a X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2019 10:49:58.5176 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RTe3Biu3LyLvl9twoKSud2kxcqiUkNu2AhofwoPNFB8QguKsCxVLpcMVPik5vMe3ojKyoPMtKKtBFh6I85bq9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4895 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 02, 2019 at 09:58:59AM +0200, Christoph Hellwig wrote: > On Mon, Sep 02, 2019 at 05:51:58AM +0000, Jason Gunthorpe wrote: > > On Sun, Sep 01, 2019 at 01:35:16PM -0700, Guenter Roeck wrote: > > > > I belive the macros above are missing brackets.. Can you confirm th= e > > > > below takes care of things? I'll add a patch if so > > > >=20 > > >=20 > > > Good catch. Yes, that fixes the build problem. > >=20 > > I added this to the hmm tree to fix it: >=20 > This looks good. Although I still haven't figure out how this is > related to the pagewalk changes to start with.. It is this hunk: @@ -481,7 +461,10 @@ static int madvise_free_single_vma(struct vm_area_struct *vma, update_hiwater_rss(mm); =20 mmu_notifier_invalidate_range_start(&range); - madvise_free_page_range(&tlb, vma, range.start, range.end); + tlb_start_vma(&tlb, vma); + walk_page_range(vma->vm_mm, range.start, range.end, + &madvise_free_walk_ops, &tlb); + tlb_end_vma(&tlb, vma); &tlb does not expand properly in the csky tlb_start_vma macro, and previously it was just tlb Jason