sendfile and page usage statistics
Jan Mikkelsen
janm at transactionware.com
Tue Oct 9 23:55:22 PDT 2007
Hi,
Igor Sysoev wrote:
> As I understand the following patch against uipc_syscalls.c
> should fix the bug to some extent:
>
> if (pg->valid && vm_page_is_valid(pg,
> pgoff, xfsize))
> + vm_page_flag_set(pg,
> PG_REFERENCED);
> VM_OBJECT_UNLOCK(obj);
> else if (m != NULL)
>
Without knowing anything at all about the surrounding code, I
suspect this patch is missing some braces. The change should
probably look like this:
if (pg->valid && vm_page_is_valid(pg,
pgoff, xfsize)) {
vm_page_flag_set(pg,
PG_REFERENCED);
VM_OBJECT_UNLOCK(obj);
} else if (m != NULL)
I don't think you'll get the behaviour you expect with your change.
Regards,
Jan Mikkelsen
More information about the freebsd-current
mailing list