Unusual Question

Valeri Galtsev galtsev at kicp.uchicago.edu
Mon Jul 10 15:57:24 UTC 2017


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" <galtsev at kicp.uchicago.edu> 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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
>


++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++


More information about the freebsd-questions mailing list