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=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C53EDC433DF for ; Wed, 10 Jun 2020 03:45:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 644E5204EC for ; Wed, 10 Jun 2020 03:45:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="igUkvz8X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 644E5204EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BCB176B0002; Tue, 9 Jun 2020 23:45:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7C7F6B0005; Tue, 9 Jun 2020 23:45:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A42E06B0006; Tue, 9 Jun 2020 23:45:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0072.hostedemail.com [216.40.44.72]) by kanga.kvack.org (Postfix) with ESMTP id 8AF2D6B0002 for ; Tue, 9 Jun 2020 23:45:18 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 553E8180AEF50 for ; Wed, 10 Jun 2020 03:45:18 +0000 (UTC) X-FDA: 76911911916.28.screw25_5f0191a26dc8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 338BF6C3B for ; Wed, 10 Jun 2020 03:45:18 +0000 (UTC) X-HE-Tag: screw25_5f0191a26dc8 X-Filterd-Recvd-Size: 4155 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Jun 2020 03:45:17 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id y1so698221qtv.12 for ; Tue, 09 Jun 2020 20:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QeqT5hbbPCXDLDKC00+0EjzExFkKZPk0Jl5kbDiCosU=; b=igUkvz8X8Uk89MLtNxKGshq/2w56i97N+2FRmWU6ob9cC6gD0Q/A8wPlt9Y6QLTzNk 28pA7cT1NJjK0IpOTFQQt3PiUEsA0pixyRls3VBotHazk9h3LOJrDqCA/0KddxTj9T1Q UWdd6tC1gRSP9nG/0zWcrFwCbYONkEEWlM2WdFGjgOF61FrgtYH3JwHf8wzT+4kUTwny gCWJPuySZuxs0sBvOGhyAxh4XQqphUKgDMwoo6TtNfzRyxlX8cgtxylZsij2nNxC+fCn 26lmomuLRzY+E7/scdizf46PPHFXRST1MvGVqeSHzrxyn9bJPhSy6Fi0jGaDlk4UfRAs wXhw== 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:content-transfer-encoding; bh=QeqT5hbbPCXDLDKC00+0EjzExFkKZPk0Jl5kbDiCosU=; b=KM40aB0+77RgvkmL1lnzdClKVVJffZLVHaM61YXES3blXZJk8+tJ3MW0FCkqqdDj81 DRKUJaR+VscHvdk5cnjO1fqJrh5ejDOyE0rS9x8n4436GilnNuuYDfhQlvA2Ivg8TOZE A/SuSXbGkTLTw1L9JeguVPMEdaAxI2aVIrZl6yN80D8CjreSMg96EWnoFRpLCLw1zMAY 6oG6PhbkhWyFCtKKsZm7QrEaISHOwksEc3aLFv+kXVye2lboenChJ3ZxdUYJ+qggfCGa 9q9841PMmavzQHdVH8Kit1oRPBC7UatABgoCkge5uhH2gJusBSfuVMm3rNLPrS89PA9S cwvQ== X-Gm-Message-State: AOAM5323JmcCGFtOtCrwjGe5mEwKlOCxSPiX0NxR5SeaKywwuo5uOKR0 BrKKOwwI2mKCiO77pugGRJP0WYo81zefDFi8AjQ= X-Google-Smtp-Source: ABdhPJzirNidMueStSJeirH2upP0n06cxqOB1zXIc9rmTkuY7tDhPywuzEjRmRFOPsED1gTHAsALDFn9gNRYv3F/Gj0= X-Received: by 2002:ac8:70da:: with SMTP id g26mr1097273qtp.333.1591760717196; Tue, 09 Jun 2020 20:45:17 -0700 (PDT) MIME-Version: 1.0 References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-9-git-send-email-iamjoonsoo.kim@lge.com> <20200609140418.GJ22623@dhcp22.suse.cz> In-Reply-To: <20200609140418.GJ22623@dhcp22.suse.cz> From: Joonsoo Kim Date: Wed, 10 Jun 2020 12:45:03 +0900 Message-ID: Subject: Re: [PATCH v2 08/12] mm/migrate: change the interface of the migration target alloc/free functions To: Michal Hocko Cc: Andrew Morton , Linux Memory Management List , LKML , kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 338BF6C3B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 2020=EB=85=84 6=EC=9B=94 9=EC=9D=BC (=ED=99=94) =EC=98=A4=ED=9B=84 11:04, M= ichal Hocko =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Wed 27-05-20 15:44:59, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > To prepare unifying duplicated functions in following patches, this pat= ch > > changes the interface of the migration target alloc/free functions. > > Functions now use struct alloc_control as an argument. > > It also pulls private argument into alloc_control and keeps it that way. > Wouldn't it be better to use explicit types and names in a union? Each > allocation callback has to understant the meaning anyway. I would > consider the resulting code cleaner that way. What do you think? Your suggestion sounds reasonable. Thanks. My plan is that, as Vlastimil suggested, I will keep the private argument i= n migration callback and use the appropriate private argument by the allocation caller. There will be no private field on alloc_control. Thanks.