Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp608523oof; Tue, 25 Sep 2018 02:10:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ktHVKihh5+JvQXTSFOX7lrZLaENhliHgKj9IdpI91CMC+QsGPZJd8JxgvvKNmmnpfwUZ2 X-Received: by 2002:a17:902:722:: with SMTP id 31-v6mr88490pli.207.1537866637800; Tue, 25 Sep 2018 02:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537866637; cv=none; d=google.com; s=arc-20160816; b=Lv8iipUNIoDbrs/eu9mgJ4yDtb5+vTPwxdpIJDZNVdletQnTRHXVnQM5ErW5L1Ipd4 ILqPOFS/wUQjiKxYo1AX8zYLw5qhfTKIpvKv06EpZ2GkwnFofz0FvqpBKhvLAUpAOHDo GSo1NiX9rO6iclhbAtSUJxmIJQmjZKRKCK1HN/9Z4enUzMYepkl0Chl1JaYuZ8IGZY7r JYNJFi0uIlsK05bPCQIf5xVkME9o5vqqLwOYbYEaT2+mNIVrcJqFLnC96uNtrQuOL6IK NaCF2pG5nqNBi7xwuGnLF9d4X2upo2pFB74UXsoWphioPWjftJzMUwLYZXC7xqzoLLXi Fw2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=SZL6QQS3XeYEyVRw3GXvtQcEhyLVTaKH4ANdPWYBzjo=; b=sTRCu/fpYNH22/ZGq5tAbpcIXI+M4GYaZHthlyjzDqLOyX3pj3Yty5HqkszkuVXozJ j21I2rEAkvb4YW4ZAhE8IHbIUNRruZ940eQnRX5R5+dDDnTxLey0NVVNxiniMRmU01Y0 g0AEBJcsMDapVA30J5qGtZODRbCFdDoxpw6nq4zDVYdLMwOyVDeD4pioniP2ADser7ya U29s3wm9NPGZCUwVnqtF42TXO3eINd+6D50JkBg3Vl3/kWQTtjP3IFOAggqZKEsZKg86 1CeAhRQKMjnZX8fpS1ZcWaE8Z2QmLvmH8Gaw/LdtGIZPOuo0JComUPbEVt5onU1uaIdf DRyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=USGD7POO; 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 n75-v6si1792784pfi.359.2018.09.25.02.10.22; Tue, 25 Sep 2018 02:10:37 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=USGD7POO; 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 S1728397AbeIYPPa (ORCPT + 99 others); Tue, 25 Sep 2018 11:15:30 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:33227 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727507AbeIYPPa (ORCPT ); Tue, 25 Sep 2018 11:15:30 -0400 Received: by mail-io1-f67.google.com with SMTP id l25-v6so6755049ioj.0 for ; Tue, 25 Sep 2018 02:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SZL6QQS3XeYEyVRw3GXvtQcEhyLVTaKH4ANdPWYBzjo=; b=USGD7POOhc4b/BYljH2BRZ/OaQ4Ecda4bEaTdR6wPZRCIEoXfScDoJmaElcxJOWrY0 dhMytc383xxfy/5D9EmVsYm3W8emmQpZCi27YwF5FmldAaoStVnk+CjGp3mJaMjGGhun VwmkmOKY9rSRlgb5PLFoR5Gehvbznn3sKD4PQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SZL6QQS3XeYEyVRw3GXvtQcEhyLVTaKH4ANdPWYBzjo=; b=W/P0WFMPNUptVwM4WASRitU+hCaz9H8/Ye6S2Mg3nI4Di7P978okKVb9tlgjidWBlc 3ztHY3Zlx/7NRo/rrNO+FG71OjVGbBreM/YXpfgGOrgElC4EVGKcaRBqDhMLSffaY/Mp w5oF0cbmjbr/Lz9cfc3nwzsEuBO1vGAGi4/Nehl+ljV+9befoaefCXe8nF/RstiPD161 DI0AkCEhEaErHV8fI0axZlzh1Wp/ZhZtG7LA7NSdXnV78T3p3HJNHh+wMGxUbSrFsbho aPXYllKJ9sDFcmaEsHcIBU+N7jooEoOgDmhSzlEA4Hvz8HbGaLdZRaTVk4R5nCKXoXhd uorQ== X-Gm-Message-State: ABuFfoj4s4Q8cj6EeiyMPwnUknKAEAGgWLJCZV9qT08rBQXdJ5ORaJaj iAqXSRulEXcedtwc5EQipsOx1BQocLHS7qDEkbFgtXC9 X-Received: by 2002:a6b:fe09:: with SMTP id x9-v6mr55085ioh.294.1537866535901; Tue, 25 Sep 2018 02:08:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bf41:0:0:0:0:0 with HTTP; Tue, 25 Sep 2018 02:08:55 -0700 (PDT) X-Originating-IP: [185.79.95.212] In-Reply-To: <153666073461.19117.1958730317836145457.stgit@localhost.localdomain> References: <153666041612.19117.14667042009014596105.stgit@localhost.localdomain> <153666073461.19117.1958730317836145457.stgit@localhost.localdomain> From: Miklos Szeredi Date: Tue, 25 Sep 2018 11:08:55 +0200 Message-ID: Subject: Re: [PATCH 3/3] fuse: Use hash table to link processing request To: Kirill Tkhai Cc: kuznet@virtuozzo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 11, 2018 at 12:12 PM, Kirill Tkhai wrote: > We noticed the performance bottle neck in FUSE running our > Virtuozzo storage over rdma. On some types of workload > we observe 20% of times pent in request_find() in profiler. > This function is iterating over long requests list, and it > scales bad. > > The patch introduces hash table to reduce the number > of iterations, we do in this function. Hash generating > algorithm is taken from hash_add() function, while > 512 lines table is used to store pending requests. > This fixes problem and improves the performance. Pushed to fuse.git#for-next with a number of small changes. E.g. I reduced the number of cachlines to 256 to make the hashtable size just 4k. Was there a scientific reason for choosing 512 as the optimal number of cache lines? Thanks, Miklos