Date: Wed, 10 Oct 2007 16:28:36 +1000 From: "Jan Mikkelsen" <janm@transactionware.com> To: "'Igor Sysoev'" <is@rambler-co.ru>, <freebsd-current@freebsd.org> Subject: RE: sendfile and page usage statistics Message-ID: <001b01c80b06$ca1c9800$5e55c800$@com> In-Reply-To: <20071010060605.GB18931@rambler-co.ru> References: <20071009125001.GC5758@rambler-co.ru> <20071010055748.GA18931@rambler-co.ru> <20071010060605.GB18931@rambler-co.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001b01c80b06$ca1c9800$5e55c800$>