Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp794792imm; Fri, 22 Jun 2018 05:30:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKhGdd6z/RmkdIrkXgHRETJHjJ6NLtaqSyv638FVFtB41+e9m37F/itO5S1qTDw0y8dWuUL X-Received: by 2002:a65:65d6:: with SMTP id y22-v6mr1262483pgv.270.1529670657351; Fri, 22 Jun 2018 05:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529670657; cv=none; d=google.com; s=arc-20160816; b=fBeZSKMpKwzy3GXI5tqNYUUIhKaFbBBvpTaBn/ho3X+V0iVsfWxR7e30Rhr7p/N1D3 l4vQFWjrqtMoXN8fZ/UCyJKqSXEQ59d6yC4wdjXYE7CuN821sHjZTAMmywy73+VYYK1Q v5jICbEH16ux10dtF6q3yJoaqwK8iizHTfNYL8iVEZl2NxplXLjbAyETolr7uDosld2D VXYy0k+n/uXVEIH+TL8+XCeS10FaT00EVH15kgS4QnGN+dT62UDVio3cn8YteOOArmif p7bmQVvn7ifGKdPJIk28Qf3h54wchwfyBk06g0gbsetWR7xDbO8lBns9lJeEYIJF4zFw fXLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=K5WY39kjXAjiowRhV+Y/xs41K96oNnB6xY/ipl6J3Fk=; b=QiUUyaslH7mzvA8LDIlUIaTLTbm4xHcrJWsWNsa+BiNTz9BPZidSeifvEX6/2RZpOx deSMrr8aEZ/INk/8YJ/Ms5Y4mdyFNUNZyxweu100/Vl+gbwmpMNVx/6hUoMYFPWb5+EL 9I1glTB6TKKXsp/n2C0H2hdr+HeatnAR9FX5N2kGHQh4i+FEKjmvT3BQyQWaT7glWBE0 F4Ubuid6zC0NXxuCjGk9faPB+JdRrn58yUT0vvmo1DbbCDLdDKBBYGSfiBT80RiVQ0Dv f4l0baezsre+259Qe3mxoOOUwsdYAAxMKpmio0cf/w/LE9m/ifnT2rl3zaD4b6e6Riw4 IAqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11-v6si7567874pll.89.2018.06.22.05.30.42; Fri, 22 Jun 2018 05:30:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751441AbeFVMaF (ORCPT + 99 others); Fri, 22 Jun 2018 08:30:05 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:32930 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbeFVMaE (ORCPT ); Fri, 22 Jun 2018 08:30:04 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fWLCO-0008Bj-P8; Fri, 22 Jun 2018 12:29:56 +0000 Date: Fri, 22 Jun 2018 13:29:56 +0100 From: Al Viro To: Christoph Hellwig Cc: Linus Torvalds , kernel test robot , Greg Kroah-Hartman , "Darrick J. Wong" , Linux Kernel Mailing List , LKP Subject: Re: [lkp-robot] [fs] 3deb642f0d: will-it-scale.per_process_ops -8.8% regression Message-ID: <20180622122956.GX30522@ZenIV.linux.org.uk> References: <20180622082752.GX11011@yexl-desktop> <20180622095608.GA12263@lst.de> <20180622100014.GA12425@lst.de> <20180622110117.GU30522@ZenIV.linux.org.uk> <20180622115300.GA14654@lst.de> <20180622115613.GV30522@ZenIV.linux.org.uk> <20180622120739.GA15351@lst.de> <20180622121722.GW30522@ZenIV.linux.org.uk> <20180622123307.GA16699@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180622123307.GA16699@lst.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 22, 2018 at 02:33:07PM +0200, Christoph Hellwig wrote: > On Fri, Jun 22, 2018 at 01:17:22PM +0100, Al Viro wrote: > > > The problem is that call to sk_busy_loop(), which is going to be indirect > > > no matter what. > > > > if ->f_poll_head is NULL { > > use ->poll > > } else { > > if can ll_poll (checked in ->f_mode) > > call ->ll_poll(), if it returns what we want - we are done > > add to ->f_poll_head > > call ->poll_mask() > > What I have for now is slightly different: > > if ((events & POLL_BUSY_LOOP) && file->f_op->poll_busy_loop) > file->f_op->poll_busy_loop(file, events); > > if (file->f_op->poll) { > return file->f_op->poll(file, pt); > } else if (file_has_poll_mask(file)) { > ... > } > > returns whatever we want part is something I want to look into > once the basics are done as it probably is non entirely trivial due to > structure of polling in the low-level network protocol. First of all, you'll get the same ->f_op for *all* sockets. So you'll be hitting that path regardless of sk_can_busy_loop(sock->sk). What's more, that way you get (on fast path) even more indirect calls, AFAICS. And I don't see any point in separate file_has_poll_mask() - just check ->f_poll_head and that's it.