From owner-svn-src-head@freebsd.org Tue Sep 15 14:22:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 748AF3D44D9; Tue, 15 Sep 2020 14:22:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BrQRF3ncQz48tb; Tue, 15 Sep 2020 14:22:17 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x731.google.com with SMTP id o5so4303652qke.12; Tue, 15 Sep 2020 07:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mcxNZ9ml64+XElxVc4WQQAawt3fdhqoVo9X3d2qvLbU=; b=NDZEKvuRHOgUgGNn295MKdjU6e5zHfybHiAk6yyqvsu7qyY8PPxfr2yW9Nwu8CWyWr afJSRsogIROlZExaykKLf3GgKA2AmZ6q4j6zvOgRzCSd9AOme5YMMwiry6B+LhU2dN/F bBbnDzVCk7wYUbJlLz4V4Q+GhPhZK5CoDgiFGarEjHXqIqplbXwxZmUtiQL2L16PohCM r6HGZQN5VutMP22g5872Dw02FCsSUo8of/gNsNf0KGbIdWwYDwiRduM/BQTCpLxpN6Ix A6HomBl2ZMLWv2hHXu7k13ECu3iNvRQCj4qSSrNrYT38i9Xz0dnGsT7JPdz/Ou1D01Lo XPUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=mcxNZ9ml64+XElxVc4WQQAawt3fdhqoVo9X3d2qvLbU=; b=QXpC1Iq84DfkPWLP262ICBy+BEWkw6BR8xvcpw1RAAZlDaM6nlgNUuYbCPgpT4VGvj clx6fI1OIrJw4h+SBt+iGMfv1tEYnrmlhmPmx0363Njh8IbHA28da2hxhjcj3oY7Ar52 qUleqMHfOH2lL7lUsZJFIHzDXccOIvNWVS/pVjIU6vUyhrlx+Omilhtn/fO7t+IwND4y HeSMZDWgSEvc5boT0ilAW7J3TEzYdcz17hC/Lku/1v46u8aAWZQwm02Hp3tFjiMklbps dxxlzzK3IRek6nPwR6LssotKvxpBGxW7uVTVsLxQFEAI3JvojcH5ffvfmupYSBZ6UWXj Triw== X-Gm-Message-State: AOAM532lxg0pG+gMehowNaRvJjeRFk7PeJIPlhBgof2wmtswZI8MF96Z vS9Xql+Kv2DUznzmISF1h+s= X-Google-Smtp-Source: ABdhPJw2Gyo2VmEmWBx79TkQ0rO4aayU0g6rWvSWhERuvyqaGzYi4jNSjL6h1FuiRymC9ReVbrSUMQ== X-Received: by 2002:a37:86c1:: with SMTP id i184mr17130082qkd.14.1600179736565; Tue, 15 Sep 2020 07:22:16 -0700 (PDT) Received: from raichu (bras-vprn-toroon0560w-lp130-18-184-148-120-111.dsl.bell.ca. [184.148.120.111]) by smtp.gmail.com with ESMTPSA id z74sm17504085qkb.11.2020.09.15.07.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:22:14 -0700 (PDT) Sender: Mark Johnston Date: Tue, 15 Sep 2020 10:22:09 -0400 From: Mark Johnston To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, peter@holm.cc Subject: Re: svn commit: r364944 - head/sys/kern Message-ID: <20200915142209.GA4145@raichu> References: <202008290429.07T4TrbH007764@repo.freebsd.org> <20200915141530.GM94807@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915141530.GM94807@kib.kiev.ua> X-Rspamd-Queue-Id: 4BrQRF3ncQz48tb X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=NDZEKvuR; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::731 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-1.59 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[184.148.120.111:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.86)[-0.857]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.01)[0.010]; NEURAL_HAM_LONG(-1.05)[-1.048]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::731:from]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2020 14:22:18 -0000 On Tue, Sep 15, 2020 at 05:15:30PM +0300, Konstantin Belousov wrote: > On Sat, Aug 29, 2020 at 04:29:53AM +0000, Warner Losh wrote: > > Author: imp > > Date: Sat Aug 29 04:29:53 2020 > > New Revision: 364944 > > URL: https://svnweb.freebsd.org/changeset/base/364944 > > > > Log: > > devctl: move to using a uma zone > > > > Convert the memory management of devctl. Rewrite if to make better > > use of memory. This eliminates several mallocs (5? worse case) needed > > to send a message. It's now possible to always send a message, though > > if things are really backed up the oldest message will be dropped to > > free up space for the newest. > > > > Add a static bus_child_{location,pnpinfo}_sb to start migrating to > > sbuf instead of buffer + length. Use it in the new code. Other code > > will be converted later (bus_child_*_str is only used inside of > > subr_bus.c, though implemented in ~100 places in the tree). > > > > Reviewed by: markj@ > > Differential Revision: https://reviews.freebsd.org/D26140 > > > > Modified: > > head/sys/kern/subr_bus.c > > > > > + } else { > > + /* dei can't be NULL -- we know we have at least one in the zone */ > > + dei = uma_zalloc(devsoftc.zone, M_NOWAIT); > > + MPASS(dei != NULL); > This does not work. I believe you need to disable per-cpu cache for the > zone, at least. But I am not sure it is enough. >From the report we have: db:0:pho> show uma Zone Size Used Free Requests Sleeps Bucket Total Mem XFree DEVCTL 1024 6415164 0 6416203 0 16 6569127936 0 so it looks like the primary problem is a leak. > https://people.freebsd.org/~pho/stress/log/kostik1314.txt