Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751548AbdG0PSG (ORCPT ); Thu, 27 Jul 2017 11:18:06 -0400 Received: from mail-by2nam03on0056.outbound.protection.outlook.com ([104.47.42.56]:39762 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750836AbdG0PSF (ORCPT ); Thu, 27 Jul 2017 11:18:05 -0400 From: Nadav Amit To: Sergey Senozhatsky , Minchan Kim CC: Mel Gorman , Rik van Riel , "Andy Lutomirski" , Andrew Morton , Michal Hocko , LKML Subject: Re: [mmots] build error: mm: prevent racy access to tlb_flush_pending Thread-Topic: [mmots] build error: mm: prevent racy access to tlb_flush_pending Thread-Index: AQHTBtTGdU6D3+FhQES4ULpORCsjw6JnyWqA Date: Thu, 27 Jul 2017 15:18:02 +0000 Message-ID: <9CE7B86A-1611-461C-B729-3588C692308B@vmware.com> References: <20170727123228.GA573@tigerII.localdomain> In-Reply-To: <20170727123228.GA573@tigerII.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=namit@vmware.com; x-originating-ip: [208.91.2.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY2PR05MB712;20:UthEl59T5/vtXBCTLKg/7U4AqGhxATedaZTqw5+cg3wwh9/kImHt+D/5Rgzrbz+39hjKoxOxkd2kwwr1ULCfR56KSDsjhqu+ZUmyV5/iDWZlvfi39zS2vEAMQ5IfEiyyDmjU9EkIJaAXRGCYVYY7NlidH31o8E0WcwK0h8cKYaA= x-ms-office365-filtering-correlation-id: e67bcde1-7a06-45cc-792f-08d4d502accc x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BY2PR05MB712; x-ms-traffictypediagnostic: BY2PR05MB712: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR05MB712;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR05MB712; x-forefront-prvs: 03818C953D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(39400400002)(39840400002)(39850400002)(39410400002)(24454002)(199003)(189002)(5660300001)(2900100001)(66066001)(14454004)(50986999)(76176999)(189998001)(54356999)(36756003)(97736004)(6246003)(39060400002)(25786009)(6512007)(4326008)(38730400002)(53936002)(8676002)(6116002)(106356001)(102836003)(81166006)(81156014)(2906002)(86362001)(229853002)(68736007)(3660700001)(99286003)(8936002)(105586002)(82746002)(3846002)(83716003)(77096006)(478600001)(6436002)(54906002)(6486002)(6506006)(3280700002)(305945005)(33656002)(101416001)(2950100002)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR05MB712;H:BY2PR05MB2215.namprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <1EF45A8F2341B046B2091D450B51BB86@namprd05.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2017 15:18:02.9627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR05MB712 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v6RFIDqK026981 Content-Length: 1121 Lines: 38 Sergey Senozhatsky wrote: > Hello, > > 8c636138f497b36ae95f ("mm: prevent racy access to tlb_flush_pending") kills > the build > > kernel/fork.c: In function ‘mm_init’: > kernel/fork.c:810:18: error: ‘struct mm_struct’ has no member named ‘tlb_flush_pending’; did you mean ‘tlb_flush_batched’? > atomic_set(&mm->tlb_flush_pending, 0); > ^~~~~~~~~~~~~~~~~ > tlb_flush_batched > > > > replacing clear_tlb_flush_pending() with a direct ->tlb_flush_pending > access > > @@ -807,7 +807,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p, > mm_init_aio(mm); > mm_init_owner(mm, p); > mmu_notifier_mm_init(mm); > - clear_tlb_flush_pending(mm); > + atomic_set(&mm->tlb_flush_pending, 0); > > > doesn't work on on !CONFIG_NUMA_BALANCING && !CONFIG_COMPACTION systems. > > -ss Missed this one. Thanks, I will fix it for v3. When Minchan repurpose this field, he should remove all of these defines (including those in mm_types.h). Minchan, do you want me to do it? Nadav