From owner-freebsd-questions@freebsd.org Mon Jul 10 15:57:23 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB562DAB62B for ; Mon, 10 Jul 2017 15:57:23 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from cosmo.uchicago.edu (cosmo.uchicago.edu [128.135.20.71]) by mx1.freebsd.org (Postfix) with ESMTP id ABC156A620 for ; Mon, 10 Jul 2017 15:57:23 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: by cosmo.uchicago.edu (Postfix, from userid 48) id 867B7CB8CE7; Mon, 10 Jul 2017 10:57:22 -0500 (CDT) Received: from 128.135.52.6 (SquirrelMail authenticated user valeri) by cosmo.uchicago.edu with HTTP; Mon, 10 Jul 2017 10:57:22 -0500 (CDT) Message-ID: <60058.128.135.52.6.1499702242.squirrel@cosmo.uchicago.edu> In-Reply-To: <20170710163351.a347713b6d8f64e141d1d9f2@sohara.org> References: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu> <20170710052228.GA2338@c720-r314251> <20170710090547.15ee3afc07c09955ba621ae1@sohara.org> <26749.128.135.52.6.1499700385.squirrel@cosmo.uchicago.edu> <20170710163351.a347713b6d8f64e141d1d9f2@sohara.org> Date: Mon, 10 Jul 2017 10:57:22 -0500 (CDT) Subject: Re: Unusual Question From: "Valeri Galtsev" To: "Steve O'Hara-Smith" Cc: freebsd-questions@freebsd.org Reply-To: galtsev@kicp.uchicago.edu User-Agent: SquirrelMail/1.4.8-5.el5.centos.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2017 15:57:24 -0000 On Mon, July 10, 2017 10:33 am, Steve O'Hara-Smith wrote: > On Mon, 10 Jul 2017 10:26:25 -0500 (CDT) > "Valeri Galtsev" wrote: > >> I believe, the kernel addresses swap not by addressing sectors on raw >> device covering the whole physical drive, but as "relative sectors" >> through swap partition device. > > Sure, but I doubt it reads the partition table again after it has > it read the first time, that's an obvious thing to cache. > >> If I'm right, once drive partition table is >> gone reading swap will fail and panic kernel. > > I doubt it, the partition table should be cached in memory, > otherwise yes that would panic the kernel, but reading the partition table > every time a page needs swapping in would be stupidly inefficient so I > don't believe it happens. I agree, it will be inefficient if it were programmed that way... however, whenever I add partition with gpart, partition table gets re-read, and new device gets created. That is what probably confused me (as gpart may trigger kernel re-read partition table, whereas dd unlikely will). Valeri > >> But the suggestion you made in another post: to make > > Not my suggestion, it's a sensible one but I don't think it's > needed. > > -- > Steve O'Hara-Smith | Directable Mirror Arrays > C:>WIN | A better way to focus the > sun > The computer obeys and wins. | licences available see > You lose and Bill collects. | http://www.sohara.org/ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++