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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE824C433EF for ; Thu, 6 Jan 2022 17:27:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F5AC6B0071; Thu, 6 Jan 2022 12:27:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 37CC76B0072; Thu, 6 Jan 2022 12:27:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F6996B0073; Thu, 6 Jan 2022 12:27:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 08B846B0071 for ; Thu, 6 Jan 2022 12:27:52 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BD74595CBF for ; Thu, 6 Jan 2022 17:27:51 +0000 (UTC) X-FDA: 79000544742.22.FBCE2B7 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by imf30.hostedemail.com (Postfix) with ESMTP id 64F8F80009 for ; Thu, 6 Jan 2022 17:27:51 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id k21so6547959lfu.0 for ; Thu, 06 Jan 2022 09:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xrDSJluLNSKPl34N9XqI8DvYP0WMSapE6tHIi4bD13A=; b=jOg3DzTHtER2ZdDdjiiiYFHMeiuaMG5vHy9p1NR4zA8qALOOqvg64FgFVjRGWXkkSi aHN4KRuRCLtcVD3pCMrD10XakRwmXDSKgQ7ayaSvJ80mwgnkJUfvDtVKty1mRktWP+p6 S9+05QA0Kk4tuwmxO172rCnsiY83zzH3Yr9hunsGoaYdSKP9yrJ5ZgBgis+Q7rN98X88 pXwmMAXfe0yhKcND8OCKjLqA75NHrH5Vaj+3lgbPlIgPIsaTyGFkdloPGA1yEGDbyuxh fcoGa95v907JDkpEoaV+u379NprSyqZOOkrU+OM86e2yDRREqG5UFBcv/qyfFYZi2bci yAIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xrDSJluLNSKPl34N9XqI8DvYP0WMSapE6tHIi4bD13A=; b=cKtQ7L9PGFgPfKv1y4iGrqquIrY68ROTLdVsOzKYl/z9sorzwk/5xsOtbiOaSfeTeE TREfIed9RIVGstip2L436JlDfG3LMCZjOXcKGP+Em5Qk3cbwRQHaOwokBZsrSFyIuq3A PskqnjbNrf+CZ0Z69NIaa1H/UUvTW0AcCmmN1gIXYJDvZYRCOD24icyrsdGcqGRmFfcj SpUVfXYjJ/BFSYnaHUxFMYKLPmE1QKBYTEgasnfR8uzjMhuRu20fpXbmKeWFvV2hNBRn BQOuTQdzUQeHnQUkpZ2lkGKMobvtpnE6ixeaqFTPVrZ2pU6MabOUiQtBTnZJfSALWqfZ +b/A== X-Gm-Message-State: AOAM530M+Qu30zWUgOgH4zzO5VpaqZ0F/GhBArx+KsX7xV7ieMdyuMPZ CaSKDfiMzsmziOis8wwncmk= X-Google-Smtp-Source: ABdhPJwVYF+CDRmVjHyZAGlOSGAzUJUK4EWKHnkNh0kFyM+8cYtJBMASj3H3tRcDlAeyKSXilBPyeg== X-Received: by 2002:a05:6512:20c2:: with SMTP id u2mr45413117lfr.376.1641490069772; Thu, 06 Jan 2022 09:27:49 -0800 (PST) Received: from grain.localdomain ([5.18.251.97]) by smtp.gmail.com with ESMTPSA id d5sm235224lfl.242.2022.01.06.09.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 09:27:48 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id CC0535A0020; Thu, 6 Jan 2022 20:27:47 +0300 (MSK) Date: Thu, 6 Jan 2022 20:27:47 +0300 From: Cyrill Gorcunov To: Pintu Agarwal Cc: Pintu Kumar , open list , Andrew Morton , linux-mm , ebiederm@xmission.com, christian.brauner@ubuntu.com, sfr@canb.auug.org.au, legion@kernel.org, sashal@kernel.org, chris.hyser@oracle.com, ccross@google.com, pcc@google.com, dave@stgolabs.net, caoxiaofeng@yulong.com, david@redhat.com Subject: Re: [PATCH] sysinfo: include availram field in sysinfo struct Message-ID: References: <1641483250-18839-1-git-send-email-quic_pintu@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 64F8F80009 X-Stat-Signature: rndztx4i98icaruo83dmgpuuptan59z3 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jOg3DzTH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf30.hostedemail.com: domain of gorcunov@gmail.com designates 209.85.167.42 as permitted sender) smtp.mailfrom=gorcunov@gmail.com X-HE-Tag: 1641490071-612063 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: On Thu, Jan 06, 2022 at 10:19:55PM +0530, Pintu Agarwal wrote: > > > diff --git a/include/uapi/linux/sysinfo.h b/include/uapi/linux/sysinfo.h > > > index 435d5c2..6e77e90 100644 > > > --- a/include/uapi/linux/sysinfo.h > > > +++ b/include/uapi/linux/sysinfo.h > > > @@ -12,6 +12,7 @@ struct sysinfo { > > > __kernel_ulong_t freeram; /* Available memory size */ > > > __kernel_ulong_t sharedram; /* Amount of shared memory */ > > > __kernel_ulong_t bufferram; /* Memory used by buffers */ > > > + __kernel_ulong_t availram; /* Memory available for allocation */ > > > __kernel_ulong_t totalswap; /* Total swap space size */ > > > __kernel_ulong_t freeswap; /* swap space still available */ > > > __u16 procs; /* Number of current processes */ > > > > Hi! Sorry, but I don't understand -- the sysinfo structure seems to > > be part of user API, no? Don't we break it up here? > > Yes, the corresponding user space header /usr/include/linux/sysinfo.h > also needs to be updated. > When we generate the kernel header it will be updated automatically. Wait. The userspace may pass old structure here, and in result we return incorrect layout which won't match old one, no? Old binary code has no clue about this header update.