Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp547678ybg; Tue, 9 Jun 2020 07:07:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtaXGbJyfm4q0qTFw0BGnWwFZz771cPyyczEtJg+E2eh3DxSRyvcLzKWH5DX9AiheKKPfg X-Received: by 2002:a17:906:ccd5:: with SMTP id ot21mr25221506ejb.508.1591711647519; Tue, 09 Jun 2020 07:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591711647; cv=none; d=google.com; s=arc-20160816; b=chSjvkxEjz1+rpm8YfPFK5mdO85lNdKfMGt6XaiR5j5qHbQ64m5kf/W48AnenObBKe jL15GGpmNQ8wltQcZrojNYYaOl8gmyrY9DlVkjIP8FHo2ovJ1vwbyOjsB0EfWvXQLcho bqo9eAD+u1CBbwYAtWcmaEoBEW3+hNaMinOEFCoqs0C43K1mAYIesneIug08tbZ+qkHC M+cyvUc9iafRfwXoEma/GyRRstn0i8ZgDF5etJlf3ZZ+bWwzukkzTAerGXY5E6U3QBN2 THR4Kha78D80Cr4IjCTa/9j1uEWh3qkH3dpQB3KRdG9/C1OZLfu/30sd5FBr6sAUzalq 4zOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rADE/GPer5pfmlG1o046PpkI8Ugu5r7+dgrjwwvPKsw=; b=qutkZNn1SSoLwuZxSsmMVxYrs5k7I9RhHdync3Mj1C87hgZWY60l5BXAo+/Jwsx9mX +fQJBVbs5c9tiYXM/m1QSfVeS2toC4vYZO9BdGuYrZi+MgwpvZZlcICOUUX73fCTCwT4 zX/2Np3cCjw8mfXZ7C0pY0sjiX+ZDoxIrNaW9hpsqy2ZioY6Lq27kVvjC602LojLqfXs U8rjowAor/xwdWY8bcB6eNmP8cM80HfnG9riJwq9Vi9h7fVxhrSUAq1Ib5jYvZPChsHy RNZy8d3nXR4axphndLinFXwyeRUx6eix05jmbgbhsvnVNw4/vNKJ3owZcxfaxAtt2vkI CABQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si10656254edw.203.2020.06.09.07.07.02; Tue, 09 Jun 2020 07:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730341AbgFIOEX (ORCPT + 99 others); Tue, 9 Jun 2020 10:04:23 -0400 Received: from mail-ej1-f66.google.com ([209.85.218.66]:35673 "EHLO mail-ej1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730175AbgFIOEW (ORCPT ); Tue, 9 Jun 2020 10:04:22 -0400 Received: by mail-ej1-f66.google.com with SMTP id y13so22524470eju.2 for ; Tue, 09 Jun 2020 07:04:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rADE/GPer5pfmlG1o046PpkI8Ugu5r7+dgrjwwvPKsw=; b=nG6/g0nGHwzPfr+5/xMVb+ZGbxqe7tQ2ePW27CIkUiTQcQWj3kj43amiqdC616X+PC WcHZwxvsjl0t6p3QZWRZ9+cW2L96NdzRo5FFssKgdQnRKafrD685Hwy51TkMNwvyg53E RNH8HA5b1e4O8Og9JwjSMHe6Wnn5nSSLSL7lOzy22QTfXqA0BYZLkDrOgaPPvOoYe1ZT bBMsrQ7hMGO/5l0SRlZoAdsXqv2ZQx4NWULok8GF1KM4jHIh8NcbdjzOkHwzyoOEfFuT Fojj/kGBbHqZ6GwcP6SarBodjOn3lnxYpilpHKqJV0ORcqAIUouFgz5RP+aojg+j2A0a 7sYw== X-Gm-Message-State: AOAM530LFP1Dw18Z768q94oo1inrix0qSIF3vOQwYn0m33WGaSjv9AIG JzGx3LaX/P71udwYyq/S6YEWhyWN X-Received: by 2002:a17:906:dbda:: with SMTP id yc26mr18056921ejb.82.1591711460158; Tue, 09 Jun 2020 07:04:20 -0700 (PDT) Received: from localhost (ip-37-188-174-195.eurotel.cz. [37.188.174.195]) by smtp.gmail.com with ESMTPSA id cx13sm15237750edb.20.2020.06.09.07.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 07:04:19 -0700 (PDT) Date: Tue, 9 Jun 2020 16:04:18 +0200 From: Michal Hocko To: js1304@gmail.com Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Joonsoo Kim Subject: Re: [PATCH v2 08/12] mm/migrate: change the interface of the migration target alloc/free functions Message-ID: <20200609140418.GJ22623@dhcp22.suse.cz> References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-9-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1590561903-13186-9-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27-05-20 15:44:59, Joonsoo Kim wrote: > From: Joonsoo Kim > > To prepare unifying duplicated functions in following patches, this patch > 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? -- Michal Hocko SUSE Labs