Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1879988ybl; Wed, 28 Aug 2019 23:43:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbSNPKL8ANMNGzcpoAJejlsrsDb9PRkyPm0f32Gaxt9AFa3hs1CNO7fgiqkA9E+cS2f9Nk X-Received: by 2002:a17:902:346:: with SMTP id 64mr8249440pld.151.1567061037976; Wed, 28 Aug 2019 23:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567061037; cv=none; d=google.com; s=arc-20160816; b=Iqr32wLZ8EIWhByE3v1S7LQfyxqrIF84748aksP1//2qKYz5ZSqGsNXK7TT6h0nJY9 X6MYmUAMDgvBTmrIuuc1BVua/BlX3e9fxUN5C86M2pZX6hi4fngDmSs9JbVgQg37D/g2 rJtOe+rgaHXq0h0KjHTMDGoQO0UOJrMa623QGutaXIRRPW4+8C9H06GlQ3cohHHhnHgT p3zE/pOhyagU0RNLsgp+20+7vf0w4RkB9hVyY73covbvSdNVYBJxCf5ZtdiwgbeU+CPP p77whFQwG3XzT02FMAqEaugKm6rInDTk1crUD+RWLGr6dhIBD5gNiPDZoO6BbjCU4h8z zIJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xpypmC/mi9ynAlxXbXniA3cJVevVlyb0XKTBmnQX2ek=; b=cfiW4kLBENGse5GQ17ZeWOsN8rZP1nJGrAyRBeZHr+fTsLBJbjVPqWJSsi+UUYqQ48 O9pacQikL2yZBMW73bHDCotfO4C8rPXAedsUFe69GhYRamsVQYaOaU2+pQRSQtoRrdFc elr2vSy33KCDC+vTyljQnEVsny6wOzXKBtDR+LhI9IDYNMTaefWX3aogIRZ9DFqUk7PG ud5o7ZAl1CeGzOgmmjIdfMcLEvN7lYoz2OY+5KougJUKR03xcxF7AwZ5GQSEdGKiKIp2 VU2UMuIf4fdaN1VHJc3o+5Bwc49n29ZJWD0HtXAgHCVvzep8Lvw3imrXRGvL9vxAEVPE 061Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ksQxfqbw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si1189104pgt.495.2019.08.28.23.43.41; Wed, 28 Aug 2019 23:43:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ksQxfqbw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726417AbfH2Gmc (ORCPT + 99 others); Thu, 29 Aug 2019 02:42:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:53046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfH2Gmc (ORCPT ); Thu, 29 Aug 2019 02:42:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0EC402073F; Thu, 29 Aug 2019 06:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567060951; bh=LUI4hV71RkxJNICcSpNRgTs4BSj0yh0DSutBWm6dN1w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ksQxfqbw0Qo5gH5tpCVTsvpYOcGOlvDWxehZBThWuSiefXxTar0I7MZfPHpewu5fq 5HagXVeJ4iJsob7R+YXSyr9j9HAA/E5hM0M17kEIpMQWS3PSsMWj5eU3wgihlj4HlC MvOqqkqQ4t/ie5gl/iy8jF3gbMWm5siOcwBeUlkQ= Date: Thu, 29 Aug 2019 08:42:29 +0200 From: Greg KH To: Peikan Tsai Cc: arve@android.com, tkjos@android.com, maco@android.com, joel@joelfernandes.org, christian@brauner.io, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] binder: Use kmem_cache for binder_thread Message-ID: <20190829064229.GA30423@kroah.com> References: <20190829054953.GA18328@mark-All-Series> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829054953.GA18328@mark-All-Series> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 29, 2019 at 01:49:53PM +0800, Peikan Tsai wrote: > Hi, No need for that in a changelog text :) > The allocated size for each binder_thread is 512 bytes by kzalloc. > Because the size of binder_thread is fixed and it's only 304 bytes. > It will save 208 bytes per binder_thread when use create a kmem_cache > for the binder_thread. Are you _sure_ it really will save that much memory? You want to do allocations based on a nice alignment for lots of good reasons, especially for something that needs quick accesses. Did you test your change on a system that relies on binder and find any speed improvement or decrease, and any actual memory savings? If so, can you post your results? thanks, greg k-h