Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1649694pxb; Fri, 20 Aug 2021 10:24:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCeI45pzuSFZ39HvBltcKUIYxpdtefvMwJ0bQY7J1/9X8NgVpqy6qgnMsu1kDxv2+rokL6 X-Received: by 2002:aa7:d40f:: with SMTP id z15mr23495760edq.113.1629480284059; Fri, 20 Aug 2021 10:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629480284; cv=none; d=google.com; s=arc-20160816; b=oNf0qax4WMGFhDfNzlwO0ElvXukuJ3pm+wsJqlmJIvD11Z/em1tZLtTlr0tdyBTPKD foRAnP15r20CG48ODEVU1z4YsIvzA8bv1FzTgy/Nw0hgeZPi9gtRKjtLktib0/+a5HP7 yqhxWvUR7AG9cyqrrDTYvzX+x3NpN3r79rKmEsXNafeuCaOfXfSh+EJT5yrq/A7fH1km 97wvPwDRXRtvxCNfs5EE/exx8fy06+wQPMp39cZcOr+Vwrw3okkX8JOFTxKHSUvh3fGj uOdYou8B9s9wSigjHrcOXeg+TFoSu2PNJerTdfHS4DNg3/bGLrLSOU3ZiAMOoxz/c0db CxTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CSRFa71O1Abz3CtsCgtEjDNe3nuYOG3QUi11RU5JHrg=; b=sKugzyEKBhE2wg7BcnD0nUlJrBW9LjzV2HmAsmz7lYO8zzm8zcOAhD+o4LxLlcfDJ3 4SB/5MfKi3HulndL84SiEZiZqoy/i8edIjKuZHBA1qLyRY8Z2HMUQpjYLc4HmwfaI7u6 mhLVMmBCyH+JylPaO55RMkZUHmQoCc4e+GdbxdR69uW7hHD8SOtionFXDXAG7YgdNSus XSt3H4yUEXFiytjNzx6fhY9CZS/2GnO/H9W0KeGbvBcCiCAH874r+lIsaw8y60UTgDQS etuIg9o13BkxIvHO7iOdjvOQh7MIwErqYGpBYvWSSSPdGf9OJETp7eNz6B6uCCbZ1eHj /+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=aQy1+sd6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm5si7459212edb.512.2021.08.20.10.24.15; Fri, 20 Aug 2021 10:24:44 -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=@soleen.com header.s=google header.b=aQy1+sd6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232585AbhHTRVV (ORCPT + 99 others); Fri, 20 Aug 2021 13:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbhHTRVU (ORCPT ); Fri, 20 Aug 2021 13:21:20 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31EA7C061756 for ; Fri, 20 Aug 2021 10:20:42 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id bq25so21532665ejb.11 for ; Fri, 20 Aug 2021 10:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CSRFa71O1Abz3CtsCgtEjDNe3nuYOG3QUi11RU5JHrg=; b=aQy1+sd63YYpCZOrulJQMkLK2awdFz2FpqFEiZc3cIQG36r1DGK8GKykRKWbpi+OdG 9l73NdbHKb1W0J4nM8drPm0iwly+paS/Yhe/D4tQbjN8DZlNGW41FCX9QGZPmnqwz187 cFzmvZTmFfffU8nrlZILZIBcZtKBFAvbhWbzwsByCf/p0b4upgcpSDcnjOq75gZv5n5Y gqQkEeF/qhGwT2zsb69Qaz0+xFoTqocWJTUpSbxTAYuSpaaiWERnMwPuEMEJm5Bp45w8 7hP1aRMzD1pnkK8UDQP4pQ+4KxbAaIVAEVHe8FMU6Y7ft2zouKpCemINyHSe3Qsqa8fA FsCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CSRFa71O1Abz3CtsCgtEjDNe3nuYOG3QUi11RU5JHrg=; b=D3D9ppoomILsa9jLhBiNZwZaEInxxYCzC52Or3Myic1zA4ZADCiknJREtqbLy5va8W 1MLNrQ05EatEXiUpV25CN+CrqfRxJKNbNJNs7i+8c1E0n5KC6ZKG70A/br7hrUg8lnnf UcMjxhaipKDYLGNmMM2xgdjQ3njd7TD6ke56y/wksHXf4YKJU7yoY08C4d5QHvzLW1mh UMUss3/9txQDTdiKJiWreeXfIyv5YUy26zUIOC2aAcz6TIPBJwN2HjsTaXuNQisebQUI 9aboT9P82IFbEPcsghyOIk50JChCLf2YO5EAEr06t5x3noU998hTS2rO7UM0NoPIWyZE BlMA== X-Gm-Message-State: AOAM530VX4iQXBXxpQJLxURUpospZ7k5/RNhoRqGEwaw5Z6M0H5Cvsc2 6HHRjunoTCq91kAp7BE34JBZD1Mz++Zzgr4gzYZKDQ== X-Received: by 2002:a17:907:f95:: with SMTP id kb21mr22991486ejc.541.1629480040739; Fri, 20 Aug 2021 10:20:40 -0700 (PDT) MIME-Version: 1.0 References: <1d03ee0d1b341959d4b61672c6401d498bff5652.1629386192.git.zhansayabagdaulet@gmail.com> <20210819163117.GO5469@sequoia> In-Reply-To: <20210819163117.GO5469@sequoia> From: Pavel Tatashin Date: Fri, 20 Aug 2021 13:20:04 -0400 Message-ID: Subject: Re: [PATCH v3 2/2] selftests: vm: add COW time test for KSM pages To: Tyler Hicks Cc: Zhansaya Bagdauletkyzy , Andrew Morton , linux-mm , linux-kselftest@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 12:31 PM Tyler Hicks wrote: > > On 2021-08-19 21:33:43, Zhansaya Bagdauletkyzy wrote: > > Since merged pages are copied every time they need to be modified, > > the write access time is different between shared and non-shared pages. > > Add ksm_cow_time() function which evaluates latency of these COW > > breaks. First, 4000 pages are allocated and the time, required to modify > > 1 byte in every other page, is measured. After this, the pages are > > merged into 2000 pairs and in each pair, 1 page is modified (i.e. they > > are decoupled) to detect COW breaks. The time needed to break COW of > > merged pages is then compared with performance of non-shared pages. > > > > The test is run as follows: ./ksm_tests -C > > The output: > > Total size: 15 MiB > > > > Not merged pages: > > Total time: 0.002185489 s > > Average speed: 3202.945 MiB/s > > > > Merged pages: > > Total time: 0.004386872 s > > Average speed: 1595.670 MiB/s > > > > Signed-off-by: Zhansaya Bagdauletkyzy > > --- > > v2 -> v3: > > - address Tyler's feedback > > Thanks for incorporating my suggestions! I can confirm that my feedback > was completely addressed. > > Reviewed-by: Tyler Hicks > > Tyler Reviewed-by: Pavel Tatashin