Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp132441imu; Wed, 7 Nov 2018 14:15:37 -0800 (PST) X-Google-Smtp-Source: AJdET5cToPMQ7okPrnC+OPQO/cbjGf99rhHaDq4KWktytuvZFgT4PqgvC5Yjvx3asqopx0n8b76p X-Received: by 2002:a63:91c1:: with SMTP id l184mr1762192pge.29.1541628937499; Wed, 07 Nov 2018 14:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541628937; cv=none; d=google.com; s=arc-20160816; b=bJg7oDEVle2Jg2CKixJrFzR1wH1aDC959Z79+YlnnwxZven1dccT0z1gywe8Sf1XxU Blu4aOoTrp047Ggws22XP/aPNLi6nXRM4mJizvAK6VD4TImERXWuQECFYufrZo9axNCn WKHPeKTvHRynKugkTsuE0deMxNlpDUZU52Wj7b7lgGqsoOo52/E2UVn2x4NEI+HAC8KM rwOcQkizazXeJm0cb3jJ+g4uhYzQio9pbd1ifZNFl+cB9dZ5xhrT8k15GU6aKhpCaWgr 5cbd2RomQ1/YzKXY5hoo5loUOXWISghvh31rw5lfmWZ5m0h5EWm1HkngFMHVId7L4p8x mR6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=pYWLSSNk7aMTwWRNzvkvoxfrBrGiW3xuUC73/vKzR4c=; b=j7NDe8eeBXfi+Fguu0qbKCW+Co398biEZm8WHs4VHLDm1C8kTuQni1e3ZxUTAex+h1 e+BK+0sQw8NV56k45ofKXj4czajZroTKNrZtBlADJCViyz38+8/pVacNsJLIpva8iIYt IBKOyDYFN1hOOs522YGBoo4USsuH+v25i25kwoW0LVxlwGlSaCV6GESU6RXxN1kMbYQh 4ydvv1pSiN0ZL8yIoXdTgX419aXeLka2Ni8voE05jG1Q4zwcVTgxuYqu5WcHSnoePGEn Pv33kU06Qr+Zs8CNZvTYJmQ0Yr24BCZ/v0pY9xoYYsqrOLec56CNoeddOJolWgU7QgjA /GUg== ARC-Authentication-Results: i=1; mx.google.com; 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 a34si1657637pgm.427.2018.11.07.14.15.21; Wed, 07 Nov 2018 14:15:37 -0800 (PST) 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; 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 S1727878AbeKHHqx (ORCPT + 99 others); Thu, 8 Nov 2018 02:46:53 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46022 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727127AbeKHHqx (ORCPT ); Thu, 8 Nov 2018 02:46:53 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 77AD9B37; Wed, 7 Nov 2018 22:14:29 +0000 (UTC) Date: Wed, 7 Nov 2018 14:14:28 -0800 From: Andrew Morton To: Alexey Skidanov Cc: sbates@raithlin.com, logang@deltatee.com, danielmentz@google.com, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, labbott@redhat.com Subject: Re: [PATCH] lib/genaloc: Fix allocation of aligned buffer from non-aligned chunk Message-Id: <20181107141428.bd1f8b1a989449633394d8c1@linux-foundation.org> In-Reply-To: References: <1541506853-10685-1-git-send-email-alexey.skidanov@intel.com> <20181106141131.76e94f6b1ff2859d96792aca@linux-foundation.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2018 08:21:07 +0200 Alexey Skidanov wrote: > > Why does this need "fixing"? Are there current callers which can > > misalign chunk_start_addr? Or is there a requirement that future > > callers can misalign chunk_start_addr? > > > I work on adding aligned allocation support for ION heaps > (https://www.spinics.net/lists/linux-driver-devel/msg118754.html). Two > of these heaps use genpool internally. > > If you want to have an ability to allocate buffers aligned on different > boundaries (for example, 4K, 1MB, ...), this fix actually removes the > requirement for chunk_start_addr to be aligned on the max possible > alignment. OK. This sort of information should be in the changelog, please. In much detail.