From owner-svn-src-all@freebsd.org Thu Jul 12 23:41:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8F951032058; Thu, 12 Jul 2018 23:41:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40C9688A97; Thu, 12 Jul 2018 23:41:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qk0-x244.google.com with SMTP id v17-v6so13910433qkb.11; Thu, 12 Jul 2018 16:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Vog8DTkiqx6AlL/5dDVe+gbcFFcZCGvT74lC/gJK3Dc=; b=eM/94gjojGew9ECKmPQlc/o+iDpWD9gUPo1AG9FAWJnqCU17sS2iJwhr0vjOIINUcg D9g4RdTnYUllA+nClP88ozfv/IhevHQ0YO3o79FFahwhH2FahjSa6gbpOF6KwjSxekSi gCGB64dVpSyJ7o/akiXis+oTVFvqHTeFDNW14+VYYF9s8XFTTQn0tQL6xMMjcEGv6aKO OGEupNuftfeK4/JzduXPGLdQTD2l4D/saGKJmCbkgO3uH1Ye1kbXc9b85IcwLor/aIXc YNSJApCmBNmyH6hIIwWiMyCcDQmRRr97GvZelX3jIDVcJftE7babEFthyUSfMwbJxFZ0 ooLA== 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=Vog8DTkiqx6AlL/5dDVe+gbcFFcZCGvT74lC/gJK3Dc=; b=KoqTbnnEM7/Jewd5F7MO67sS6s0Hmuj/+ozvQxL0p0+uy6sg5DSyhywf5/TfJD4961 PB+/G4YJQfh4RPZEkPi4W2REfnjquc0sgtJZUB2ZpYB8VQH47YMB034dNDRBeuKgrruR Eq1AmbzvEU+DpIoryhJbGZmZPEFq1+sA5N5pXTnRl6q/7MihFOkG2zJSacgxCBojK1WL ORtho/a9UJ43WbO7Wxo5k/dBgdzvJ2kGcrkuFl+lISapTWHxcuecLyY+fsDaslnTMR2f GQCW83PkQS7XRS+JurasTRO6H6FmGJlOsL14nDQqZKWEpsmiwGvcLdUr2lxzEw74CbZc h0sQ== X-Gm-Message-State: AOUpUlE+o/VIde3lKi/kynqnR0Tb82Mmi0xzWPykQwrA2XprQiKfg3ln 7VzyDeXFT7LFLIDayF/5CLpt0lK2Z+yA9XqEPBw= X-Google-Smtp-Source: AAOMgpefQaqT77L95ZWueaAu2TeBbBj9O3KQ3AhZQ1c8KcYkIenpBhb9B5I1uzRUL+UAapWtYJDlqlJBMElkvGFZMDk= X-Received: by 2002:a37:77c7:: with SMTP id s190-v6mr3673066qkc.73.1531438906517; Thu, 12 Jul 2018 16:41:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:aed:2807:0:0:0:0:0 with HTTP; Thu, 12 Jul 2018 16:41:46 -0700 (PDT) In-Reply-To: <20180712225856.GA26064@raichu> References: <201807122235.w6CMZqO8030291@repo.freebsd.org> <20180712225856.GA26064@raichu> From: Mateusz Guzik Date: Fri, 13 Jul 2018 01:41:46 +0200 Message-ID: Subject: Re: svn commit: r336231 - head/sys/vm To: Mark Johnston Cc: Mateusz Guzik , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2018 23:41:47 -0000 uma_zone_get_cur iterates the per-cpu stats and looks at the zone-global stats. The patch only gets rid of rolling them up, thus there is no difference from the pov of this func. I don't follow the remark about uma_reclaim. On Fri, Jul 13, 2018 at 12:58 AM, Mark Johnston wrote: > On Thu, Jul 12, 2018 at 10:35:52PM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Thu Jul 12 22:35:52 2018 > > New Revision: 336231 > > URL: https://svnweb.freebsd.org/changeset/base/336231 > > > > Log: > > uma: whack main zone counter update in the slow path, freeing side > > > > See r333052. > > > > Modified: > > head/sys/vm/uma_core.c > > > > Modified: head/sys/vm/uma_core.c > > ============================================================ > ================== > > --- head/sys/vm/uma_core.c Thu Jul 12 22:34:40 2018 (r336230) > > +++ head/sys/vm/uma_core.c Thu Jul 12 22:35:52 2018 (r336231) > > @@ -3135,14 +3135,6 @@ zfree_start: > > cpu = curcpu; > > cache = &zone->uz_cpu[cpu]; > > > > - /* > > - * Since we have locked the zone we may as well send back our > stats. > > - */ > > - atomic_add_long(&zone->uz_allocs, cache->uc_allocs); > > - atomic_add_long(&zone->uz_frees, cache->uc_frees); > > - cache->uc_allocs = 0; > > - cache->uc_frees = 0; > > - > > Doesn't this break the accounting of these stats? uma_reclaim() doesn't > update them when it frees cached items, and uma_zone_get_cur() doesn't > look at the stats for cached buckets. > -- Mateusz Guzik