Merge upstream occupied calculation

Change-Id: Iea458c6f4fb51985b5e822ac8419917200209736