From owner-svn-src-all@freebsd.org Wed May 22 20:01:01 2019 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 6890715B62A1; Wed, 22 May 2019 20:01:01 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 E88D7966AF; Wed, 22 May 2019 20:01:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-yb1-xb43.google.com with SMTP id a3so1349371ybr.6; Wed, 22 May 2019 13:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G6npryVKK5D7IkZfTDykEfevA4OCojq3SvA97yern14=; b=VjACRsXVLdoFFxt++Qo0NdURv5sd4iYnOU5FArRARHa/a8qGe2Xk91j0rbbhjx+et5 DMC+7HoVnxA48WunKQP4DKwd2sjE9hoIvnDzjDGXwybKieZPn2cf8EIfkDtAoU0uNZCl KehC/lpKTsbVSwNjNlTaOKdWVVFLy5KkgnYrOcMyfHs3548SMjgsAGOLVBFjuGTED6UC xyaiAKsHXxdQVFpM1qaKoQmM2icgaAiDRIH1Y2h85z9TrRbWz5xCO2NYwCJXTZexczGi +AVa9YrrjKh69jfTz68ba/jqPH7Z7oSjzuAl11dwF5+Rk4aW8dyX/EyeMlsegE8toB1e VAhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=G6npryVKK5D7IkZfTDykEfevA4OCojq3SvA97yern14=; b=B72RIkqeCfKO3WdmmWPlJHlhB0DIdAzXTz8J6NKbMVS0H4oxS3eiQ9vVVgTamDb/ba 4weIFrd6jablXDmdiyXLVaBMrSbH4h+5AowQOEJ8gxa4jpwBTEkPxvextBXmsQ4jtTKh mjgd9zh2HKzm7wr1j9IJBHUxvvDGcAyl/OkinL5g/mUR4TvCnWrBbILfFSuH7dgFST4B qfBtUeE2+/oa0WZmgY2judZc7w1HH6lYbpCVKPNetW4Zw8Cha6zLwIiRDcbXmPYGcBLO Gzww0SqQOfxrazEBhpBbORiMm5xRiioLyQFa094a7ruA00T+fVkyKj4fSLsF9J2I8OGE 2DzQ== X-Gm-Message-State: APjAAAWkx0beuqvc+ucy7oZ1PmtXAi/5ND5PMud3Bq12rUNVsBPDkpal YFFB/LqNVMf119XtmwSsHjbJbajpGJs= X-Google-Smtp-Source: APXvYqyZqfcTubcWrLtyh8o+uhVcN2J1UiHl6YFjoznvKAvTCcLIxLaePKFZhYfIi5X2FDy9Kt9PMw== X-Received: by 2002:a25:f506:: with SMTP id a6mr11738898ybe.33.1558555259937; Wed, 22 May 2019 13:00:59 -0700 (PDT) Received: from mavoffice.ixsystems.com ([12.189.233.129]) by smtp.gmail.com with ESMTPSA id a69sm1253054ywa.84.2019.05.22.13.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 13:00:59 -0700 (PDT) Sender: Alexander Motin Subject: Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201905221843.x4MIhmh1012837@repo.freebsd.org> <20190522194914.GF47119@zxy.spb.ru> From: Alexander Motin Openpgp: preference=signencrypt Autocrypt: addr=mav@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFOzxAwBCADkPrax0pI2W/ig0CK9nRJJwsHitAGEZ2HZiFEuti+6/4UVxj81yr4ak/4g 9bKUyC7rMEAp/ZHNhd+MFCPAAcHPvtovnfykqE/vuosCS3wlSLloix2iKVLks0CwbLHGAyne 46lTQW74Xl/33c3W1Z6d8jD9gVFT/xaVzZ0U9xdzOmsYAZaAj4ki0tuxO9F7L+ct9grRe7iP g8t9hai7BL4ee3VRwk2JXnKb7UvBiVITKYWKz1jRvZIrjPokgEcCLOSlv7x/1kjuFnj3xWZU 7HSFFT8J93epBbrSSCsYsppIk2fZH41kaaFXsMQfTPH8wkeM6qwrvOh4HiQM08R+9tThABEB AAHNIUFsZXhhbmRlciBNb3RpbiA8bWF2QEZyZWVCU0Qub3JnPsLAlwQTAQoAQQIbAwULCQgH AwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOmM88TmnMPNDledVYMYw5VbqyJ/BQJZYMKuBQkN McyiAAoJEIMYw5VbqyJ/tuUIAOG3ONOSNYqjK4eTZ1TVh9jdUBAhWk5nhDFnODN49Wj0AbYm 7aIqy8O1hnCDSZG5LttjSAo3UfXJZDKQM0BLb0gpRMBnAYqO6tdolLNqAbPGJBnGoPjsh24y 6KcbDaNnis+lD4GwPXwQM+92wZGhCUFElPV9NciZGVS65TNIgk7X+yEjjhD1MSWKKijZ1r9Z zIt4OzUTxxNOvzdlABZS88nNRdJkatOQJPmFdd1mpP6UzTNCiLUo1pIqOEtJgvVVDYq5WHY6 tciWWYdmZG/tIBexJmv2mV2OLVjXR6ZeKmntVH14H72/wRHJuYHQC+r5SVRcWWayrThsY6jZ Yr4+raTOwE0EU7PEDAEIAOZgWf2cJIu+58IzP2dkXE/urj3tr4OqrB/yHGWUf71Lz6D0Fi6Z AXgDtmcFLGPfMyWuLAvSM+xmoguk7zC4hRBYvQycmIhuqBq1jO1Wp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ID: <4766287e-283a-775d-9e8e-4d0442d802f3@FreeBSD.org> Date: Wed, 22 May 2019 16:00:58 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190522194914.GF47119@zxy.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E88D7966AF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 22 May 2019 20:01:01 -0000 On 22.05.2019 15:49, Slawa Olhovchenkov wrote: > On Wed, May 22, 2019 at 06:43:48PM +0000, Alexander Motin wrote: >> Author: mav >> Date: Wed May 22 18:43:48 2019 >> New Revision: 348117 >> URL: https://svnweb.freebsd.org/changeset/base/348117 >> >> Log: >> Allocate buffers smaller then ABD chunk size as linear. >> >> This allows to reduce memory waste by letting UMA to put multiple small >> buffers into one memory page slab. The page sharing means that UMA >> may not be able to free memory page when some of buffers are freed, but >> alternatively memory used by that buffer would just be wasted from the >> beginning. >> >> This change follows alike change in ZoL, but unlike Linux (according to >> my understanding of it from comments) FreeBSD never shares slabs bigger >> then one memory page, so this should be even less invasive then there. >> >> MFC after: 2 weeks >> Sponsored by: iXsystems, Inc. >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) >> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) >> abd_t * >> abd_alloc(size_t size, boolean_t is_metadata) >> { >> - if (!zfs_abd_scatter_enabled) >> + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) >> return (abd_alloc_linear(size, is_metadata)); > > may be `size < zfs_abd_chunk_size`? Why? It should be the same from memory usage, but I see theoretical benefits from having linear buffer with one page rather then scatter list with one page. Plus ZoL also had there `size <= PAGESIZE`. -- Alexander Motin