Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2010 11:43:37 -0700
From:      Artem Belevich <fbsdlist@src.cx>
To:        =?ISO-8859-7?Q?Vladimir_=27=F6=2Dcoder=2Fphcoder=27_Serbinenko?= <phcoder@gmail.com>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: [PATCH] [yeeloong] Kernel support for non-4K pages
Message-ID:  <AANLkTinU=p6p7mXHV-%2BxBGFStK-jE9C400F4G0mRTNWj@mail.gmail.com>
In-Reply-To: <4CA07AF3.1040403@gmail.com>
References:  <4CA0436E.2080005@gmail.com> <4CA07AF3.1040403@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Some time back FFS filesystem on FreeBSD had an issue when block size
was smaller than page size. It was present circa FreeBSD-6. I'm not
sure if the issue got fixed or not since then. It may be worth
checking.

Here's a rough outline of a test case my colleague Patrick Kerharo
used to demonstrate an issue with 64K pages and 8K block size. The
idea would apply to 16K pages as well if you use filesystem with 4K
block size.

fd =3D open("a_file"); /* Creates a file to be later mapped. */
unlink(fd);          /* Use the file just for this program. */
ftruncate(fd,32k);
/ * Make the file size 32k, this creates an incomplete 64k page in the
    buffer cache, with nothing in the first 24k, then 8k of zeros,
then nothing in the last 32k.
    The inode of the file points to the thrird block of data, there is
no block #0, #1, #2. */

mmap(fd,n*64k);
/*  After that read anywhere in the first 64k and vm_fault() fails,
  because it does not handle faults in pages with a missing beginning.
The assumption made
  by the vnode pager is that it has a block for this page if and only
if it has the first block
  for the page. */

--Artem



2010/9/27 Vladimir '=F6-coder/phcoder' Serbinenko <phcoder@gmail.com>:
> On 09/27/2010 09:10 AM, Vladimir '=F6-coder/phcoder' Serbinenko wrote:
>> Loongson CPUs have an annoying VIPT cache and 14 bits of virtual address
>> are used for tagging. So either we need an excessive and difficult to
>> maintain cache flushing or to use 16K or biger pages. Note than when
>> configuring Linux on Yeeloong only page size of 16K and 64K are proposed=
.
>> This patch fixes bunch of hardcoding of page size related constants and
>> changes PAGE_SHIFT to 14 on Yeeloong.
>>
>>
>
>
> --
> Regards
> Vladimir '=F6-coder/phcoder' Serbinenko
>
>
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinU=p6p7mXHV-%2BxBGFStK-jE9C400F4G0mRTNWj>