From owner-freebsd-arch@FreeBSD.ORG Thu Jun 18 12:34:21 2015 Return-Path: Delivered-To: arch@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D978798; Thu, 18 Jun 2015 12:34:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5D72CCD; Thu, 18 Jun 2015 12:34:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t5ICYFRO077295 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 18 Jun 2015 15:34:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t5ICYFRO077295 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t5ICYEse077294; Thu, 18 Jun 2015 15:34:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Jun 2015 15:34:14 +0300 From: Konstantin Belousov To: Gleb Smirnoff Cc: Alan Cox , arch@FreeBSD.org, rmacklem@freebsd.org Subject: Re: Step 2 Was: more strict KPI for vm_pager_get_pages() Message-ID: <20150618123414.GG2080@kib.kiev.ua> References: <20150615212931.GG73119@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150615212931.GG73119@glebius.int.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2015 12:34:21 -0000 On Tue, Jun 16, 2015 at 12:29:31AM +0300, Gleb Smirnoff wrote: > Hi! > > This is step 2 of the "more strict pager KPI" patch: > > o Uninline vm_pager_get_pages() into vm_pager.c. > o Keep all KASSERTs that enforce the KPI of pagers and of their > consumers in one place: vm_pager_get_pages(). > o Keep the code that zeroes out partially valid pages in one > place in vm_pager_get_pages(). > I added Rick to Cc:, since there is something which I do not quite understand in the NFS client code. According to NFS v3 RFC, server may reply with the short read for a read RPC. In case the EOF flag is not set in the reply, this means that the data is available, and it is a transient server condition that reply was truncated. Do we handle the short reads ? I see the code in nfs read path which zeroes the absent parts of the buffer. Similarly, there is a code to zero the unread part of the page after VOP_GETPAGES(). But couldn't this result in the zeros instead of real data after the short read ? At least, I was not able to find code which would retry after reply without EOF.