Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4005907yba; Tue, 9 Apr 2019 09:09:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMjt8UP3Rykp5VAFbUwvnZrTcdQ0mmLEy0BVPnpxDyoiGGLcLR6qKXA40McfxKP1AAc0rA X-Received: by 2002:a65:4183:: with SMTP id a3mr36429393pgq.121.1554826179167; Tue, 09 Apr 2019 09:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554826179; cv=none; d=google.com; s=arc-20160816; b=bQiQ3L+lyrawWGj4EVcFGwHz3mVQL4/2d6lJqjg5wRxkAJ2RULcc5xxaU/tBhznWg7 TQlKbDBc/Uq8kQsE4ubxMY0OVWzlQQ2r90BsnD8OJ6S6UJx1KWHy9gIgtjugvq1DbjRy IEAr50zWePx5ROdx+WjIOWPEBTNQgcn3UoAniwtLJAZbN0J7k3askGuCA7gle8JEaN2o GPlppNvzJIZZtbRDQ23k999+fHNAHXrBxt5sjn962Cz95jXiKSdQrN2mXlYJaLLhr7FZ 7Zk76W+EvuA84X4oLOncfO41fW4reLPmPXs69HgBu+8JdE7iZ99kccwTMlu3toIOPiRQ r8+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=ukIp5K6XgUw8eCYSQP4WBy1wOYWCCxL8MZRY+ss74fk=; b=RyxgRU6Wxn9g8x0Qy2WdFxQIYG2rKij+Muq1+uU2wuHu4rxT8gG52iDDzrsWqXnKHW GUhhwxj4eY4XspbAn0N6zYuOfQaNQS3pb+z+zuMTtqfYs8MhUDoRpF2IXSxA6XxUEV5h 8C0ldpAGqyx9IufA03WYki8Aad16gfj/xHrZs658QJxYTigktcIXzqfNyzMBkmIrf4vN aK94lqqpgcMYXvg4O1FtKR0Wpar8jDGvQzvtAFy/kde4thwP3F0TnvnCTVbRzCwLk1c7 3bhunGlGDZ2P2gnYzGPBPAhYPIRHmWxQb9VVTmxU0jTbSwEADuT7n8fbKJqHWJU5wSVz TTbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=QEWNNzv2; 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 w17si29705661pll.30.2019.04.09.09.09.23; Tue, 09 Apr 2019 09:09:39 -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=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=QEWNNzv2; 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 S1726676AbfDIQG6 (ORCPT + 99 others); Tue, 9 Apr 2019 12:06:58 -0400 Received: from a9-36.smtp-out.amazonses.com ([54.240.9.36]:58882 "EHLO a9-36.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbfDIQG6 (ORCPT ); Tue, 9 Apr 2019 12:06:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1554825675; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=50hYcoxn2BeHRqUR1dpDDp6CiUZIJ7B2QB39HCVWIo4=; b=QEWNNzv2USVY0eK4qZBeLwqUhjEJKQaLcv2Sjoj0ui7jHwhE5VYqbs+gguUqGV/Y 8jePuQR1l7hK5LYSixUqXo6iIejvUJ8sb0KgVNwUC3sZX6/LBq8ked3lgviThFihuJO R9zkPKuicFLqOtOOWM81WYtIAFsm6miHL94a1KDw= Date: Tue, 9 Apr 2019 16:01:15 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Pankaj Suryawanshi cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: Basics : Memory Configuration In-Reply-To: Message-ID: <0100016a02d5038e-2e436033-7726-4d2a-b29d-d3dbc4c66637-000000@email.amazonses.com> References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.04.09-54.240.9.36 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 9 Apr 2019, Pankaj Suryawanshi wrote: > I am confuse about memory configuration and I have below questions Hmmm... Yes some of the terminology that you use is a bit confusing. > 1. if 32-bit os maximum virtual address is 4GB, When i have 4 gb of ram > for 32-bit os, What about the virtual memory size ? is it required > virtual memory(disk space) or we can directly use physical memory ? The virtual memory size is the maximum virtual size of a single process. Multiple processes can run and each can use different amounts of physical memory. So both are actually independent. The size of the virtual memory space per process is configurable on x86 32 bit (2G, 3G, 4G). Thus the possible virtual process size may vary depending on the hardware architecture and the configuration of the kernel. > 2. In 32-bit os 12 bits are offset because page size=4k i.e 2^12 and > 2^20 for page addresses > What about 64-bit os, What is offset size ? What is page size ? How it calculated. 12 bits are passed through? Thats what you mean? The remainder of the bits are used to lookup the physical frame number(PFN) in the page tables. 64 bit is the same. However, the number of bits used for lookups in the page tables are much higher. > 3. What is PAE? If enabled how to decide size of PAE, what is maximum > and minimum size of extended memory. PAE increases the physical memory size that can be addressed through a page table lookup. The number of bits that can be specified in the PFN is increased and thus more than 4GB of physical memory can be used by the operating system. However, the virtual memory size stays the same and an individual process still cannot use more memory.