Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp666801ybi; Fri, 2 Aug 2019 02:16:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGb+ov321c7tTOZawJjwZ27iaRoV173rktRMPw9Y88RZ3d0/603gHWWbpl9vPlhVsloqry X-Received: by 2002:a62:5252:: with SMTP id g79mr57698757pfb.18.1564737366909; Fri, 02 Aug 2019 02:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564737366; cv=none; d=google.com; s=arc-20160816; b=aH/mqqKJj2VvQg3SCs86t61Mj2M11+1U1Dc4MmM4Y9SF+NvEQO617C5/WwhQdymwju sMfIfzxMpce3zG5GwLn4jLqmRikn5fhjXUyufc0MirvjPK3dFmDzDrH5mq6xcHpOBiPu jRm2PdTL6l43bruLR7l0qT4Ku7evfqZ+HpwLh3qARW8ik3ZoI5a8mjk3aNVOEw96otme JhC7PwQ69k8wIfXVn9L3mOPmlD8Z7tQaO3sY77VkchQU8nKJDPU3xiPRSxD1fhSOsXuu JBIDRPWE17I3vNMaUSMuTFJrdu7kor2AyMow2ndEBh/MyUNWNSpl/v62qPol2DyNBtOB aRZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=muPaeAkG+2kRgNk9rHfszictajfO+ojMUChrBpXTEK8=; b=ZfRESgND7zEnbc8Z1wxZ5x+SO9ape9avpBEJq2sH2lQFKXJPNxNG8eDPp5yncjOc8C 26QE+PqxPHNZw3gkkDa9lyehorYdTrBD+o9Xj5zFBTW1IaB35MNa3y/D5Pu4pXHfCl7r 6otwCHN+Ean4et0RKoPhx/QJonVl18CXF9oOyghAiM0joyRIuZLq83fyjoZwrfiH2gRl QfSJCBtUmqmni2RhCU8duRMQSSH6HNvAwaOgNM0fSj/7XcpLv7R/JgCaN9a4gSN8y5w+ Q96MvO7BLwa52SvnbV3CNg96kzz5pw4mtniQB9mLjPlh4FsMA7+0Fre9o4bZ8dDA7HbZ U2jA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si33751693pls.145.2019.08.02.02.15.51; Fri, 02 Aug 2019 02:16: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388882AbfHBGqY convert rfc822-to-8bit (ORCPT + 99 others); Fri, 2 Aug 2019 02:46:24 -0400 Received: from mga06.intel.com ([134.134.136.31]:16775 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388295AbfHBGqY (ORCPT ); Fri, 2 Aug 2019 02:46:24 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 23:46:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,337,1559545200"; d="scan'208";a="167149268" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga008.jf.intel.com with ESMTP; 01 Aug 2019 23:46:23 -0700 Received: from orsmsx157.amr.corp.intel.com (10.22.240.23) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 23:46:23 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.96]) by ORSMSX157.amr.corp.intel.com ([169.254.9.94]) with mapi id 14.03.0439.000; Thu, 1 Aug 2019 23:46:23 -0700 From: "Prakhya, Sai Praneeth" To: Andrew Morton CC: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "Hansen, Dave" , Ingo Molnar , Peter Zijlstra Subject: RE: [PATCH] fork: Improve error message for corrupted page tables Thread-Topic: [PATCH] fork: Improve error message for corrupted page tables Thread-Index: AQHVSCCBTlnukuaks0aiZwfZ/9aV0qbnaerQ Date: Fri, 2 Aug 2019 06:46:23 +0000 Message-ID: References: <20190730221820.7738-1-sai.praneeth.prakhya@intel.com> <20190731152753.b17d9c4418f4bf6815a27ad8@linux-foundation.org> <20190731212052.5c262ad084cbd6cf475df005@linux-foundation.org> In-Reply-To: <20190731212052.5c262ad084cbd6cf475df005@linux-foundation.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTA1ZTgzNWMtZTdlZS00NjAxLWEzYWEtNDMxMDE2NzU0MDQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9vODNtelwvV0pQeHloZ2YzM0czTnRRSVYrRXNoVzlSU3hZWDRPa1RYcmppbkN2NjVUQmRUcVJaSHRGdld4cVljIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > +static const char * const resident_page_types[NR_MM_COUNTERS] = { > > > > + "MM_FILEPAGES", > > > > + "MM_ANONPAGES", > > > > + "MM_SWAPENTS", > > > > + "MM_SHMEMPAGES", > > > > +}; > > > > > > But please let's not put this in a header file. We're asking the > > > compiler to put a copy of all of this into every compilation unit > > > which includes the header. Presumably the compiler is smart enough > > > not to do that, but it's not good practice. > > > > Thanks for the explanation. Makes sense to me. > > > > Just wanted to check before sending V2, Is it OK if I add this to > > kernel/fork.c? or do you have something else in mind? > > I was thinking somewhere like mm/util.c so the array could be used by other > code. But it seems there is no such code. Perhaps it's best to just leave fork.c as > it is now. Ok, so does that mean have the struct in header file itself? Sorry! for too many questions. I wanted to check with you before changing because it's *the* fork.c file (I presume random changes will not be encouraged here) I am not yet clear on what's the right thing to do here :( So, could you please help me in deciding. Regards, Sai