From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD372CA9EA0 for ; Fri, 25 Oct 2019 14:51:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 988DA21929 for ; Fri, 25 Oct 2019 14:51:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="g1Vv+ThR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 988DA21929 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4240C6B0005; Fri, 25 Oct 2019 10:51:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D3BB6B0006; Fri, 25 Oct 2019 10:51:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E8EA6B0007; Fri, 25 Oct 2019 10:51:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 081B56B0005 for ; Fri, 25 Oct 2019 10:51:26 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id A60258249980 for ; Fri, 25 Oct 2019 14:51:26 +0000 (UTC) X-FDA: 76082595372.15.shame84_c8b6f491b544 X-HE-Tag: shame84_c8b6f491b544 X-Filterd-Recvd-Size: 2169 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Fri, 25 Oct 2019 14:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dpt4qdOi5CEApuvmfZvI+2JJ4EkpfuTj+k4EFTjR15U=; b=g1Vv+ThRr1il0izWY5JcrPSg0v 4qcoVf5TGZievG5GxLf2xVdtBVyiPnXoN5fWwnuS+sASK32Ys6uogkiw3kL0bGfPPelsTJX6N69GI gyMhpM5zMRBudTL4CEj5Q/nIregH/2GPOvLOLV1XqJBj7TQnprL/dp/DvCfftj9wnVdXI99Yw/QLQ XMj8/HhDJhDer6HC7ZNORCxJOC91PEP0FcZ+2cnoQGvCIL6tki0bOq+CP1oFZig3yhdkfxjfIOKby I0S3VbxYZ4TfB0om+SQk9G+Jg6hA28AZi0L8tFiUjqHbQG6tuSFnRSOd+zzgHQfu/+wO/4KZEH3Vj lOGKMXWA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iO0w1-0000qr-3J for linux-mm@kvack.org; Fri, 25 Oct 2019 14:51:25 +0000 Date: Fri, 25 Oct 2019 07:51:25 -0700 From: Matthew Wilcox To: linux-mm@kvack.org Subject: [PROJECT IDEA] More kmalloc sizes Message-ID: <20191025145125.GO2963@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.1 (2019-06-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.010954, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: I was thinking about doing something which would require allocating 1024 bytes plus an 8 byte header. It occurred to me this is practically the worst possible case for our current slab allocator -- it will round the 1032 byte allocation up to 2048 and we'll get two of them per page. If we had a slab that was 1344 bytes, we could get three objects like this per page, and they'd still be 64 byte aligned. Similarly, it might be worth adding slabs of size 576 (512 + header, get 7 per page) and 320 (256 + header, get 12 per page). Should be a fairly simple project for someone to undertake.