From patchwork Tue Aug 14 15:05:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10565821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 020A715A6 for ; Tue, 14 Aug 2018 15:05:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA2602A05E for ; Tue, 14 Aug 2018 15:05:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEB972A0E6; Tue, 14 Aug 2018 15:05:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A48CC2A05E for ; Tue, 14 Aug 2018 15:05:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08CDF6E296; Tue, 14 Aug 2018 15:05:38 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id E57AC6E28B for ; Tue, 14 Aug 2018 15:05:33 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id l2-v6so10711102wme.1 for ; Tue, 14 Aug 2018 08:05:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DyTCtHWcjmTqTr9rxGi2AWp+M3htFbf3grYJurhYxnY=; b=ulkM6yBJq1vv0o8xviBgpIE4RVg6vdjwifMSqH8jdt1ICsIhHWA+w4lkF/DgrNTQrH VefpM4YmTbnwmQNsmeTRE9VwQMib0pw4iD1fQfRAFVYacf0rAoWlm+i+x2dBE52EX4L4 M3EhILQ/4zuleOcQYy71WPs9PBxRxHkS651YdZbBa6elqJXRqFDize1qlmqqpbI8cvsN oWYH5KGxyDruP+tR7v5AYTcvTbCzPd2wG6uKGNT0nzQwlmJ3NNdYavDJS07Ry0IlZA8s VB4gN6qydI9s3cDX1jDFwuFcJ8BEeLSYrto/8vYV0M6pUQkUfPwX2CrYNxg/vAAsE2TW tcIA== X-Gm-Message-State: AOUpUlEXnScXniLWfFKhJgBcCp6VUYRyqtMwGy6uBDI7rBXX1RmizCqs eHVlA7WeAId1MmROP0DRemBE+szrEL0= X-Google-Smtp-Source: AA+uWPwyUhCXAaR7aDOtyfGy9GdtMuxb8llWI1CL0kpXCe0egOTDgZ1fi2c9ZAtI/CACo/dxE3QNiA== X-Received: by 2002:a1c:2396:: with SMTP id j144-v6mr11047502wmj.26.1534259132559; Tue, 14 Aug 2018 08:05:32 -0700 (PDT) Received: from localhost.localdomain ([95.144.165.93]) by smtp.gmail.com with ESMTPSA id x82-v6sm39942383wmd.11.2018.08.14.08.05.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Aug 2018 08:05:31 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Tue, 14 Aug 2018 16:05:16 +0100 Message-Id: <20180814150519.20204-5-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180814150519.20204-1-tvrtko.ursulin@linux.intel.com> References: <20180814150519.20204-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 4/7] gem_wsim: Stop keeping batches mapped X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin The reason, which I assume was there at some point, to keep the batches persistently memory mapped does not appear to be there. So unmap them after creation and remove the unused structure members. Signed-off-by: Tvrtko Ursulin --- benchmarks/gem_wsim.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c index 34758419254a..24f518a7770f 100644 --- a/benchmarks/gem_wsim.c +++ b/benchmarks/gem_wsim.c @@ -128,7 +128,6 @@ struct w_step struct drm_i915_gem_relocation_entry reloc[4]; unsigned long bb_sz; uint32_t bb_handle; - uint32_t *mapped_batch; uint32_t *seqno_value; uint32_t *seqno_address; uint32_t *rt0_value; @@ -136,7 +135,6 @@ struct w_step uint32_t *rt1_address; uint32_t *latch_value; uint32_t *latch_address; - unsigned int mapped_len; }; DECLARE_EWMA(uint64_t, rt, 4, 2) @@ -755,8 +753,7 @@ terminate_bb(struct w_step *w, unsigned int flags) *cs = bbe; - w->mapped_batch = ptr; - w->mapped_len = mmap_len; + munmap(ptr, mmap_len); } static const unsigned int eb_engine_map[NUM_ENGINES] = {