Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1424542pxv; Fri, 2 Jul 2021 03:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycvFfzEnYG2e6dO+XeM47MXm07OjIs9uDutKBut6MxzI2NPPZbRK5kMI8fThMCcBU2zbKe X-Received: by 2002:a17:907:c13:: with SMTP id ga19mr4684119ejc.209.1625222007540; Fri, 02 Jul 2021 03:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625222007; cv=none; d=google.com; s=arc-20160816; b=CZhtfylR98vY/riaCOUxR5A5A5/+JgKTvO0RMAut3Z1jpa0T3aykytiLaD9MpNTdmN fsDB+1+uLBsfHNnxdRxlsvt0fLZ35mreRr6MVQu8RnbNz3p1qh5Vphupq+kOzCDrJ5nw dJLz0dPskfgdZ8KEqM/drk4Nz6/vOSUhaxBTnj3MHkrGQKQVtt9jWsdW+QgRFqkoh2qX bB3WpzzhehB1J7zjt29qoW49m8Nz8JnYIcVe3FKsIXy8ehJZysEs5AJTxgq9mSNDfTrp ZYEtsuGtRglOlk2VwZtFHN8JmLbcJCc8+EGdC1Fm2DeVXhDkfEb35TwA/YUujJ2uzMW6 i14A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uTz0s4cHmn20J3O6/eToC+IwV2hxla/S4Rdju1MyUOs=; b=hP0CN8Y+u+HNErN5lEXLKpxuxwdysH9qhxX9A6aBo9kpMc6TTfd9fFedBkV53h0kFm R3/J/k7/OY4qKRGSdJOj/+TgLuIxilBLF3oJ5l1Lo8kN25jSjphG6dcnhkhxSpSuIPTk YSQJqMPHWncEYKN4dqdG47AAhBKfh3zrbg0lh4v5El8uauc/onZy/oWp4YWNMV3tCiZn GLy9SUTM4f8GGTlBpXxs8G7db7Q6oaqZNOvxv5z7EZvRXXHhwKEAyVku7eYASbFpiQB3 W2PmOCf7k7AFBOPNa06YiK85Uabk+vpo4wgyqqEfc1NyFXBapj1ZH1RfL7FvF7yUFhhn pUBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BJyV2/3X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si3021584edk.216.2021.07.02.03.33.04; Fri, 02 Jul 2021 03:33:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BJyV2/3X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231330AbhGBKdD (ORCPT + 99 others); Fri, 2 Jul 2021 06:33:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22065 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbhGBKdC (ORCPT ); Fri, 2 Jul 2021 06:33:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625221830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uTz0s4cHmn20J3O6/eToC+IwV2hxla/S4Rdju1MyUOs=; b=BJyV2/3Xrtex1p+U2Q5miuJJBfZ+Jqi34EL9pRcWHcX5ni3Ei0wzX2xs9uIELGWjrud06M 2ZjFe1m2ZaIBctxI2moGcUYBWyXnVXYjqexmw0AmGlOiUicZ3sv+2pneliPNV0PbGDgJCq s6hkXtoZRGviJw4E/XL4vuL/DMlBBWw= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-E90LcJaJNMWCg8rWdUIlPw-1; Fri, 02 Jul 2021 06:30:29 -0400 X-MC-Unique: E90LcJaJNMWCg8rWdUIlPw-1 Received: by mail-ej1-f71.google.com with SMTP id p5-20020a17090653c5b02903db1cfa514dso3380012ejo.13 for ; Fri, 02 Jul 2021 03:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uTz0s4cHmn20J3O6/eToC+IwV2hxla/S4Rdju1MyUOs=; b=q127X5ne0F+meXCR1518rOL/mhDGXpCslRqIIrxv9Jg/hZ+OHT/vot7Vg4y5LyDaQ+ pXHttgFpS86OfiI2MTAeesEmsaFmDZwO7dGCCEhhskHKF2jXZhmlGG0vjNdWQiTF4/tH XbloXtW6Fj+D1H9i3GbrJM5GoatexlE83ZytVWo2TCHc3E1lJaNseK9nOyE5WdtwWy9U wXX7QNiwjZU37HDYZ55FikjAc7l2rycs66nX6GlLPqRaSaWIaJcOB0nSxLVCBFxWja2Z 03Kn9DiPnIDCdWZFAZLv4LRFWNMYaL6KohMZ7BU75QViiRn4DwRR0VN2HHheqqiDKEzz 2r+w== X-Gm-Message-State: AOAM533mAPq4/UfnxfxaLVMV5THNtCZZDyE3shebRiiSbhCJFPjORkab qI/NjdUcCjtoGttfMECTsB7Bm+wxqgefg6MHA98YfvGhY+mcD5Y7n7g85i/PCJyp+GbKaeL4Z5C 2V9qK5Tc9yNfDRrcHI6qP3Aaj X-Received: by 2002:aa7:c607:: with SMTP id h7mr5787935edq.13.1625221828476; Fri, 02 Jul 2021 03:30:28 -0700 (PDT) X-Received: by 2002:aa7:c607:: with SMTP id h7mr5787920edq.13.1625221828301; Fri, 02 Jul 2021 03:30:28 -0700 (PDT) Received: from krava ([185.153.78.55]) by smtp.gmail.com with ESMTPSA id n4sm867333eja.121.2021.07.02.03.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 03:30:27 -0700 (PDT) Date: Fri, 2 Jul 2021 12:30:24 +0200 From: Jiri Olsa To: Alexey Bayduraev Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel , Andi Kleen , Adrian Hunter , Alexander Antonov , Alexei Budankov , Riccardo Mancini Subject: Re: [PATCH v8 20/22] perf session: Load data directory files for analysis Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 06:54:59PM +0300, Alexey Bayduraev wrote: SNIP > + while ((ret >= 0) && readers) { > + if (session_done()) > + return 0; > + > + if (rd[i].state.eof) { > + i = (i + 1) % session->nr_readers; > + continue; > + } > + > + ret = reader__read_event(&rd[i], session, &prog); > + if (ret < 0) > + break; > + if (ret == READER_EOF) { > + ret = reader__mmap(&rd[i], session); > + if (ret < 0) > + goto out_err; > + if (ret == READER_EOF) > + readers--; > + } > + > + /* > + * Processing 10MBs of data from each reader in sequence, > + * because that's the way the ordered events sorting works > + * most efficiently. > + */ > + if (rd[i].state.size >= 10*1024*1024) { > + rd[i].state.size = 0; > + i = (i + 1) % session->nr_readers; > + } hi, so this was sort of hack to make this faster.. we need some justification for this and make that configurable as well, if we keep it jirka