From owner-svn-src-head@freebsd.org Tue Sep 15 14:39:12 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 174F03D508E for ; Tue, 15 Sep 2020 14:39:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 4BrQpl2NsDz4BNH for ; Tue, 15 Sep 2020 14:39:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82a.google.com with SMTP id k25so3328591qtu.4 for ; Tue, 15 Sep 2020 07:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TP7YonQhYWQT4DUtksPNNbCClYH+7sIEhRmxHtoxeGQ=; b=lJuw7h+ZRpIShfmtV3v9w6zDXwH5aepAt58bLPrjbY7qRR5ExHnTnDml8ToyyIxChJ Y1ea6Kbp8GupK5QHRbs2jyUBVUpIp5mnzd/uvK8XlzoPYy1jOxQgfeCfbl13uLykmVIw jJvRrZ+Basl7WYgFo4M8BgjP40pK1NE8995GRI+5W8sB+04uDlkoWuSSi8y1GSyi5mZB DQsqDbH+ZwwbhNT5Y5RFIfC+h4tHdo/x1uFrkkXQqJkFWa8oUhzoOtPgMWQa7uMu/aKX as8ve6mafPeR+jLY0zxYGcXEshjx8pHb1Sp795C6BvQfbA5MrTWiGQxnIpk55ZrX4/y7 rEZw== 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=TP7YonQhYWQT4DUtksPNNbCClYH+7sIEhRmxHtoxeGQ=; b=GW18Q3yU4Jza/Z555Rv2tDjnz0Ieh1z3WionYa48IYAlHBIR2BrYIilA5nZcvKrp70 op9dd1SnldToRlyWFOXAfCQ3qssAPMR8tzTJX94E2qDrl7owWKX7NxrY5ZX3HS8mvsfi +ei5d9JLWMhTshdgHVHtD1qe9fnQIqhHijNUYKwM0nHxxKmbzdn3BYxBxtDQpo4Kdh37 5yahcKyY02Q1tKwzn5PKTny9nY9AwJ6GbqMdStaWPBL5Z8p+aUCK1WrR4LLMV5YMRXE5 B+XVQvjN9QQxTwFrDluG8pOkOTIV6r29CRWka13Z4hWTu6Jkp0odsxmNfdqDlKzLYZKV uSlA== X-Gm-Message-State: AOAM5306KSUGzyTf4Gq/JqJWw82bglADPpt6ajJN9N7M/ZjXpBocFwwZ ucTDyyTchbnpk+BxGEguolPgyqMVWAbVM28PDTrjHw== X-Google-Smtp-Source: ABdhPJxPGEfc4ZQikbg/dkinyV38stUpJkF8U3pDUIasWjjkfZJsIbSsehhZukTW5XlP5qqz5TACYwZYE7TZgqxaoTo= X-Received: by 2002:ac8:4548:: with SMTP id z8mr18806358qtn.291.1600180749901; Tue, 15 Sep 2020 07:39:09 -0700 (PDT) MIME-Version: 1.0 References: <202008290429.07T4TrbH007764@repo.freebsd.org> <20200915141530.GM94807@kib.kiev.ua> <20200915142209.GA4145@raichu> In-Reply-To: <20200915142209.GA4145@raichu> From: Warner Losh Date: Tue, 15 Sep 2020 08:38:57 -0600 Message-ID: Subject: Re: svn commit: r364944 - head/sys/kern To: Mark Johnston Cc: Konstantin Belousov , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, peter@holm.cc X-Rspamd-Queue-Id: 4BrQpl2NsDz4BNH X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=lJuw7h+Z; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.79 / 15.00]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.928]; NEURAL_HAM_LONG(-0.98)[-0.985]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_SHORT(0.13)[0.126]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82a:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org,holm.cc]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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:39:12 -0000 On Tue, Sep 15, 2020, 8:22 AM Mark Johnston wrote: > 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 I'll look into it. Warner > >