Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9143643ybi; Tue, 23 Jul 2019 22:43:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxtIKDZZaJSVd9uiFkBoeStLXJBMFZWYLfAQCnwgUgSQsCAmqw/lkseK/YuFakCE35XxFB X-Received: by 2002:a65:50c8:: with SMTP id s8mr40167709pgp.339.1563946986434; Tue, 23 Jul 2019 22:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563946986; cv=none; d=google.com; s=arc-20160816; b=vue8neq1WUf9iaGKUUUf/JTGjTHrfWWRHE2PQjPviwV8CaKy/koeSnnaYZuWTDQXsV e/EDWDP0pzKkowTQK5AhA1aJg7McDmlMuy10aDa1x2h+uMtOQwUgA2oCY8RFdU4sWRZu hzsUDa0r99fFLGfrNGsi1z+gBH2WHcjewKSXDlTFgMhem0mO5C25XkWRyCIRp6KTAZLf eAJ+dkFmmAWu7EELVGGt2HNQ8lNfJXQNkJOZBlENuEFesN38WjLCHckol3oHo9wMU6ZJ WXgrjihE7JP380L+PGlHwOTRatip9dSyRZ/0ny8pmIDv/a7kSVj/ivhlOZxr7oVXXBNR 9+BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6myo2V5Wcm7a6T80pjYDS9nkwm7Etwa8PcEvkBNAk24=; b=QN8m+Sje/YB4aNKT2yMx9lzStcuF6QwRdky4mCK/w8FcSTacbSaDXzPkZmIk9XYBQL TNtc4ql11PGsgjwMWOL3MX2AaUhJIKVViQJRt8dgq2KffMMzY+kfQ5aF4MTHf0Ca4tq1 8GnmZtuUThscgDDbdFuED/Z4fjEyUGOdwhB5eXziUlLGpEyfw+ML0zPmyzXNBkF8BZhP Q328RjmWDBCI++zv0W+sJixEZ9mtFphgYen91TQqHtFwbaFW8Q474l+yDeEYLa6tvX3V YZCQzc+mMeqBMmfR3lm25O9f1dMyDyDPMMQpwNKVC+jrbbmzdia+yxa6t1Kk4GkcMz61 vTMA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s64si15120122pgs.464.2019.07.23.22.42.51; Tue, 23 Jul 2019 22:43:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726038AbfGXFlZ (ORCPT + 99 others); Wed, 24 Jul 2019 01:41:25 -0400 Received: from verein.lst.de ([213.95.11.211]:47601 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfGXFlZ (ORCPT ); Wed, 24 Jul 2019 01:41:25 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 72F3D68B02; Wed, 24 Jul 2019 07:41:23 +0200 (CEST) Date: Wed, 24 Jul 2019 07:41:23 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: Ralph Campbell , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , =?iso-8859-1?B?Suly9G1l?= Glisse , Christoph Hellwig Subject: Re: [PATCH 1/2] mm/hmm: a few more C style and comment clean ups Message-ID: <20190724054123.GA685@lst.de> References: <20190723233016.26403-1-rcampbell@nvidia.com> <20190723233016.26403-2-rcampbell@nvidia.com> <20190723235747.GP15331@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190723235747.GP15331@mellanox.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 23, 2019 at 11:57:52PM +0000, Jason Gunthorpe wrote: > diff --git a/mm/hmm.c b/mm/hmm.c > index 16b6731a34db79..3d8cdfb67a6ab8 100644 > --- a/mm/hmm.c > +++ b/mm/hmm.c > @@ -285,8 +285,9 @@ struct hmm_vma_walk { > struct hmm_range *range; > struct dev_pagemap *pgmap; > unsigned long last; > - bool fault; > - bool block; > + bool fault : 1; > + bool block : 1; > + bool hugetlb : 1; I don't think we should even keep these bools around. I have something like this hiding in a branche, which properly cleans much of this up: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/hmm-dma-cleanup Notably: http://git.infradead.org/users/hch/misc.git/commitdiff/2abdc0ac8f9f32149246957121ebccbe5c0a729d http://git.infradead.org/users/hch/misc.git/commitdiff/a34ccd30ee8a8a3111d9e91711c12901ed7dea74 http://git.infradead.org/users/hch/misc.git/commitdiff/81f442ebac7170815af7770a1efa9c4ab662137e This doesn't go all the way yet - the page_walk infrastructure is built around the idea of doing its own vma lookups, and we should eventually kill the lookup inside hmm entirely.